Casting animation not working. Help.

I followed a youtube tutorial on how to set up a casting animation, but I’m getting errors and I can’t seem to fix them. Any help on how to fix the script?

You can fix like this.

Ok so the animation is working now, but I can’t seem to stop it. Every time I press the button it’s an endless repeat even thou I should have added the script for it to stop.