what i would like is a script that would print the last number of a value
example: if my number was 15 it would print 5 ive tried to do this and it just wont work
The modulus opperator. %
can be used for exactly what you need. Simply do local LastDigit = Number % 10
and you'll get the last digit of the number. In the case you want to remove decimals too, use math.floor(Number % 10)
instead.