Counter, adding/ subtractinng with timers & variables

Hey guys,

I created a scene variable “b” . I set it to 1.
I made a timer “a”. If the timer is greater than 0,05. “b” got reduced by “0,05”. And the timer get a reset. If “b” is equal to “0” it will be set back “1”.

And so on… It should go endless. BUT it stops randomly, at some time. I don’t know why. How can i make it endless or at least, that it don’t stop. The origin idea was to make a “cool down” on a key. I took a variable so I can change the value with a button.

Thanks, for reading, wish you a great day, and hope you stay healthy!

edit: i solved it. but still dont know why it stopped. it stopped every time on a diffrent number.

You’d need to have shown your events before it was fixed in order for us to give more guidance. My bet is it was something to do with a condition.