math.random(number m, number n)
✓ ANSWER ACCEPTED
What does number m and number n in math.random mean?
1 answer
✓ Accepted answer
As mentioned in the above answer, the two arguments mean these two things:
- M is the minimum number.
- N is the maximum number.
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...
local num = math.random(1, 10)
...but this would throw an error:
local num = math.random(0.01, 0.1)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
M = Minimum N = Number (Maximum)
print(math.random(5, 10)) -- Gives any random number between 5 and 10