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