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

Can you put random inside wait()?

Asked by 10 years ago

I noticed the Random() method and the wait() method. And I wanna know if it is possible if random can go into wait()

Example

wait(random)

Will it wait a random number?

3 answers

Log in to vote
0
Answered by
Dom2d2 35
10 years ago

Yeah, math.random() is a nice function for what you are trying to do. You can say math.random() to generate a completely random number, or you can specify the range in which your random number can be. For example, you could say math.random(1, 100), this will return a random number somewhere between 1 and 100. The same applies while using wait() so if you want it to wait a random number of seconds between 5-30, you could say

wait(math.random(5, 30))
Ad
Log in to vote
1
Answered by 10 years ago
wait(math.random(1,60)) -- This wait between 1 and 60 seconds
Log in to vote
0
Answered by 10 years ago

No it will not, sorry.

Answer this question