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

How would i create a random number generator from 0 - 10?

Asked by
PastDays 108
6 years ago
Edited 6 years ago

I want a script that changes the value of an IntValue every 3 - 5 seconds (with a number between 0 - 10) but i'm having trouble finding anything on how i would do it, Any help would be much appreciated!

0
literally just made a block with SurfaceGUI that displays a random number between 1-100 before i saw this CaptnCosmic 54 — 6y

1 answer

Log in to vote
0
Answered by
Nikkulaos 229 Moderation Voter
6 years ago
Edited 6 years ago
while wait(math.random(3,5)) do
local value = math.random(0,10)
print(value)
end
--I havnt tested this out in studio yet, but this should work.
0
Thank you :) Works great i will look into math.random and teach myself it i appreciate the help have a wonderful day! PastDays 108 — 6y
0
No problem. Keep shining m8 Nikkulaos 229 — 6y
Ad

Answer this question