Math.floor to 2 decimals doesn't work!

For some reason when I this part of my script runs it does nothing:

local number = 1,333333 -- example, I know you can't do this you have to make this a string and tonumber it if you want this!

print(number) -- prints: 1,333333

rollTime *= 100
math.floor(rollTime)
rollTime /= 100

print(number) -- prints: 1,333333

I don’t know why ir doesn’t work the second time can someone help me or tell me another way to do this?

math.floor(rollTime) has no effect because you have not used the return value, change it to this:
rollTime = math.floor(rollTime)

Hello! So the problem is with “math.floor(rollTime)” function. Try changing it to rollTime = math.floor(rollTime).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.