Topic was automatically imported from the old Question2Answer platform.
Asked By
MaximoTG98
Hi,
So let’s say a have a variable called number,and two buttons adding and subtracting “1” to that value.If i keep spaming the button the number variable will keep rising without a limit,but i just want it to stop until it is 0 (in case of subtracting) or 3 (in case of adding).
i tried to use the clamp() function,but it returns a value instead limiting the value.
Have a good day.