I am trying to make a simple spedometer (no decimals), but when I get the velocity, it has really long decimals, how would I remove them?
1 Like
Try using math.modf
local num, decimal = math.modf(10.248) -- should return 10, .248
print(num)
3 Likes
I don’t think he needs both the decimal and the integer part, he can use floor