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

the code im having problems with is very simple, actually its just a single line:
image
but for some reason it gives me this error:


why is that?

1 Like

I don’t think you can add a number that high with math.random, you can try 1e+10

math.random can only go up to the 32 bit interger limit (somewhere around 2 billion), you can try multiplying the result

math.random(1,2000000000)*math.random(1,4)
1 Like

yeah looks like that was the issue

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.