Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What does this Output error mean?

bad argument #2 to 'random' (interval is empty)

I don't know what that means, can someone tell me what it means?

2 comments

2

You have a math.random statement and the second number is less than the first.

0

Thanks!

1 answer

GoldenPhysics's answer:

You have a math.random statement and the second number is less than the first.


That is, something like

math.random( 5 , 0 )

When explicit numbers aren't typed, it will frequently be from code that looks like this:

math.random( 1, #tab )

Which will cause a problem if tab is empty (since 1 > 0).

This discussion is preserved as it was. New answers, comments, and votes are closed.