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

How do I use Math Random?

I have been trying to figure out how to use the mathrandom to generate a random wait time from 50 to 100 seconds. Can anybody help?

2 answers

✓ Accepted answer

Ok.. Math.random() does a random number that is between one and another number, so if you are doing 50 and 100, math.random(50,100) would choose a random number between 50 and 100. I hope this helped! ;)

Simple.

numbers={3,5,6,2,9,1}

function Entered()
	print(math.random#numbers)
end

game.Players.PlayerAdded:connect(Entered)

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