You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I want a button that when pressed gives the player a boost of speed for a short period of time, with the player being able to reset the timer every click, The button is supposed to be annoying and inconvenient.
The way I have it set up, is through two timers
One that manages how long the sprint lasts “SprintTimer”
And a delay “Subtract Timer” between subtracting 1 from the “SprintTimer”
- What is the issue? Include screenshots / videos if possible!
However, despite my best efforts, it keeps subtracting from SprintTimer if the player spam clicks the button, until it goes into the negatives and the player needs to wait to use the button again, before they can sprint. This is not intentional nor what I want.
- What solutions have you tried so far? Did you look for solutions on the Creator Hub?
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
I have tried an if statement, putting it into another script, IntValues, changing values
Unfortunately none of these have worked.
Scripts
Explorer
Output log (Script intended effect)
Output Log (Script unintended Side-Effect)
Video of the error