Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do I change - number to + number?

Asked by 5 years ago

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.

1
math.abs() or math.clamp() if u want to set a min value and a max EXpodo1234ALT 18 — 5y
0
doesn't really help cause it just print's the lowest value :( n1ksutin123 3 — 5y
1
math.abs() or multiply the number by -1 DeceptiveCaster 3761 — 5y
0
thanks it worked! n1ksutin123 3 — 5y
0
you gotta be kidding me xd DeceptiveCaster 3761 — 5y

Answer this question