Hi, im working with math operations and i need to change a value with a random number but im having a problem.
[lua]local speed = (-1.2)
local function speedChange()
speed = math.random(-2.5,-1.2)
end[/lua]
If I use that function, speed changes succesfuly but the problem is that it just dont read the decimals, speed change to -2 or -1, wich is a problem because there is a lot of difference between -1.2 and 1.8 in my current proyect.
Thanks in advance. [import]uid: 108461 topic_id: 31677 reply_id: 331677[/import]