Random interval empty

So I was working on a project and after changing none of the code, the project failed to load and returned an error: bad argument #2 to ‘random’ (interval is empty). I tried the project later and everything was working again, but it has stopped again. Can anyone tell me what’s going wrong?

Not without seeing some code, like the line that’s causing the error. Does the screen rotation cause the error when you start.

@dave1707 oh yeah it was because I was holding it in portrait mode. Whoops! Thanks, by the way, I was trying to improve the mini golf game.