#why ts not work
1 messages · Page 1 of 1 (latest)
What doesn't work
The TotalDmg comes out as -10
** You are now Level 7! **
when if the totaldmg is less than 0 it should change to 1
yea
U already defined it
math.clamp() staring at the corner
It takes 3 values. X, min and max. If X is in the range between min and max it returns X. If X is lower than min it returns min and if X is higher than max it returns max. This can be useful for tons of applications, but a good example would be constraining rotation on an axis. If you want a player to control the rotation of a brick on the Y ax...
that's really good material
rather than verifying ur total damage after subtracting, add it inside clamp as the value to be returned
if it's in between 1 (your min) and ur max value, then no issues
if it's below 1, it becomes 1
thats been accounted for its just I forgot to remove local from a variable