Check in the code to ensure that you did not assign that variable to anything else other than a animation track. Also, send the entire scope in which that variable was used and set, your current post is vague.
I don’t think you would get an error for checking a value of a variable.
Is CurrentAnimation an Animation object or AnimationTrack? If it’s an Animation, it might return nil because :Stop() isn’t a valid function so it is trying to call nil.
Otherwise we need more resources to find out what is going on
Errrrm, Sorry there is too much stuff that is important in this place. But I figured our why (Kinda)
Before the if statement it isn’t nil, and while the if statement is happening is does become nil. I’m going to keep trying to find a solution.
Well the only way this can happen is if your calling the function with the incorrect params, also in the future if your not comfortable with sharing your code then it makes no sense to ask for help, your post is very vague and you can’t expect no-one to help.