Basketball Script Animation

Basically, I give a control script to my player whenever they pickup a basketball, and remove it when they dont have the basketball. Here is where my issue is. I have a shooting animation and I want to set my bodygyro maxtorque and bodyvelocity maxforce when the animation stops, but my script gets destroyed so it does not happen. how else could I do this?

Perhaps you can make use of this

That’s what I was doing, but my script was being destroyed. I did find a solution though, thank you for your help! All I did was instead of destroying the script as soon as I drop the ball, I do it after the animation is finished