I’m using math.round(math.random(10,20)) trying to get a random integer between 10 and 20, but I keep getting long floats in the output when I print it. How can I get whole values out of this? I have tried math.floor as well.
math.random in itself does not return decimals but here’s a fix
local Equation = math.round(math.random(10,20))
local Fix = math.floor(Equation)
Again no reason for math.round honestly for a math.random function
Looking back I had some old code that was giving me a decimal I had forgotten about, thanks for the reply though
Remember to mark your reply as a solution so people will know that the topic is solved!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.