math.random(number m, number n)
As mentioned in the above answer, the two arguments mean these two things:
However, number
can be a bit misleading. This is because math.random()
only takes integers, not floating-point numbers (decimals). That means that this would work…
1 | local num = math.random( 1 , 10 ) |
…but this would throw an error:
1 | local num = math.random( 0.01 , 0.1 ) |