How to make a sprint button with a cooldown (Difficulty 5/10)

So either I did it wrong, or the guide messed up. I can infinitely press the sprint button without cooldown

have you tried waiting for the button to go away because the sprint I made has it to where you can press it infinitely but it still goes on cooldown. That happened because I couldn’t figure out how to make it go away before the sprint speed stopped.

Oh I did some tinkering and figured it out, now it disappears after you use it for a little