This returns -1 in the output.
local myVariable = 100 myVariable = math.clamp(myVariable,0,100) myVariable = -1 print(myVariable)
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.
You are setting the value to -1 after your clamp therefore it prints -1.