Holding input action in stamina system

Hello everyone.

I am studying BluePrint, but I’m having trouble implementing a stamina system, I want to make is that while the player is holding the Shift Left it will execute the action of running (Correr) and decrease the current player stamina in 20 per second. The player has 100 maximum stamina (What gives him 5 seconds to finish it due to reduction). I’m trying to use a gate to implement this logic.

The problem is that the action does not last half a second and already over. and yet the “Correr” action continues running even with insufficient value, I wonder what I’m doing wrong.

Can anyone help me?

does the delay with world time last forever? Open them side by side so you can see the logic working in blueprints just to be sure. Maybe take that out and add a regular value in there? I’d mess with the delays and the values to make sure it’s not a “game time” vs “what we think of as a second” issue.

hi . i guess this blueprint can help you :