I'm making a gun that know's how much it deletes from ammo when it reloads. So I have this currently for testing the math

print(math.floor(loadedammo + 0.5) - 8 + loadedammo)

and I wan't to make it change the - number that it prints to change into a + number and I have no idea how to do it.

5 comments

1

math.abs() or math.clamp() if u want to set a min value and a max

0

doesn't really help cause it just print's the lowest value :(

1

math.abs() or multiply the number by -1

0

thanks it worked!

0

you gotta be kidding me xd