Hello, so currently I'm having an issue with getting animation to work smoothly. So far most of what I wanted is working as intended except that when going from an idle animation into an attack animation, it sometimes stutters a bit at the start, and secondly if I spam enough I can get the attack animation to endlessly loop as seen in the video I provided down below. Normally if I don't spam it works the way I want to where the attack animation must complete before the character can even move.
But yes, I need help solving this weird endless animation glitch. Any and all help would be appreciative.
Here is the current code with a video of the issue. If you need any more information let me know and I'll gladly provide more.