The title is a little difficult to understand but basically I want to know is it possible, and if so how, do you generate random numbers only by 10's
local randomnum1 = math.random(50, 500)
I then want the answer to be one of the following: 60, 70, 80, 90, 100, etc. (I think you get the point). If anyone knows how to some help would be awesome, I tried looking through the roblox and LUA wiki but couldn't really find anything.
I would recommend getting a small number, then multiplying it by 10.
For example, if we wanted a random number between 1 and 50, but only counting by 10's - 10, 20, 30, 40, 50 - we could get a random number between 1 and 5, then multiply that by 10. This works because 1 * 10 is 10, 2 * 10 is 20, 3 * 10 is 30, etc.
local randomNum = math.random(1,5) print(randomNum * 10)
I think I found the solution (yes this is me answering my own question) couldn't I just do this
local randommath = math.random(1, 50) local finalmath = randommath* 10
Just curious if that was right guys?