It comes out in my output:
bad argument #2 to 'random' (interval is empty)
It comes out in my output:
bad argument #2 to 'random' (interval is empty)
It means that you made an error in argument 2(the second number)
Breaking down the error:
math.randomThe 2-parameter use of math.random is math.random(low, high).
If high is less than low, then the interval [low, high] (in math notation) is empty -- there is no number at least low and less than high.
A frequent cause of this error is code that looks like this:
list = {}
print( math.random(1, #list) )
This is a problem, since #list is 0 and 0 is less than 1.
Usually, it's not so obvious -- more likely, you're using :GetPlayers() or :GetChildren() when there are none.
This discussion is preserved as it was. New answers, comments, and votes are closed.