Widget button on released playing on clicked event

I want to make it so a blocking animation is played for the player, so when I click the shield button it will play the animation to block, then play the animation to stop blocking after a short time.

when I hold the button down it will only play the block animation
except when I release the button, it plays the animation to stop blocking, but then on clicked decides to activate as well, repeating the on clicked animations.
when I release the button without my mouse being on top it, this does not happen and it all plays as intended. I tried changing on clicked to precise click but it just makes it worse.
I hope I explained myself okay let me know if you have a simple answer

One way might be to make method where
StopBlocking → Retriggerable Delay (1.0) → PlayStopBlocking Animation. I haven’t test this, but it might work for you

Hey thanks for the answers! it helped but I changed a few other things to help it as well and fixed it thanks man

Instead of making two functions for blocking and unblocking, I kept one of them and used a flipflop, and also took away the “on clicked” event since it doesn’t like being used with on pressed. I connected both: “on released” and “on pressed” and the flipflop did the job.