I ran this:
1 | print (math.randomseed( 5 )) |
It output a blank space, which is a nil value. This is preventing me from doing math.randomseed(tick()). Help?
math.randomseed(tick())
is just done to change the seed of the (pseudo)random number generator. What you're looking for is math.random
:
1 | math.randomseed(tick()); |
2 |
3 | local randomNumberBetweenOneAndFive = math.random( 5 ); |
Read more about random numbers.
Hope this helped.