How to stop wait seconds.

Ok so I need help(Just a warning I’m using visual scripting bolt ).
So I’m making a fps with sliding and if you slide for 1 second you stand up, or if you let go of shift you stop sliding.

So right now it sets a var called slide to 1(true) waits 1 second then changes to 0 (false), but i need it so if you let go of shift it cancels that wait second until next time you hold shift. If you could just give me a general idea of what I need to do would be awesome.

The problem is that when I let go of shift and press it again it doesn’t work until that wait seconds finishes from that last time it was called

Also I know my update needs to be in a couritine to use wait. I just threw this example together and forgot that.