Hey there! So i found this post and i dont really understand the code much since it isn’t mine but i really don’t see a minimum or maximum thing.
How would i apply minimum and maximum variables to this?
Thanks!!
Hey there! So i found this post and i dont really understand the code much since it isn’t mine but i really don’t see a minimum or maximum thing.
How would i apply minimum and maximum variables to this?
Thanks!!
You would use the math.clamp()
function, as its name suggests it clamps its first argument between its second and third arguments.
math.clamp(x, y, z) --if x >= y and x <= z then x, if x <= z and x < y then y, if x >= y and x > z then z