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

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

I'm using math.random to get a random position but i get this error_

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

how do i fix this?

here is exactly what i'm using.

Vector3.new(math.random(10,-10) , 0 , math.random(10,-10))

1 answer

✓ Accepted answer

Just swap the values from low to high

Vector3.new(math.random(-10,10) , 0 , math.random(-10,10))

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