Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago
p.Position = Vector3.new(math.random(100,226),math.random(100,10),math.random(100,261))
1
math.random(100,10) has no interval, there are no numbers between 100 and 10. Overscores 381 — 5y
0
smaller number goes first ;) ForeverBrown 356 — 5y
0
it should be math.random(10,100); i mean the smaller number stand in front of the big number c0nc3rt 61 — 5y

1 answer

Log in to vote
0
Answered by
Syclya 224 Moderation Voter
5 years ago

Random.new should be used in new work. math.random() is for the benefit of games that are already using it.

Full explanation: https://scriptinghelpers.org/questions/70444/randomnew-or-mathrandom-which-is-superior

This might not have been a fix for you, but it's worth a read. Hope this helped!

Ad

Answer this question