I have tried to use the math.Clamp function but I’m quite confused as it does not constrain my int value. I need a way to set a maximum and minimum number so the int value cannot go above or below the number.
In your code, math.clamp(1,0,2) clamps the number literal constant 1 as this is placed in the first (named “n”) argument rather than the IntValue so it does not constrain the IntValue as expected.