After I entered the
if (!currentTarget) {
animator.SetBool(“isAttacking”, false);
}
line into my script I started getting
NullReferenceException: Object reference not set to an instance of an object
Attacker.Update () (at Assets/Scripts/Attacker.cs:21)
messages in the console and the attackers do not resume walking after they destroy an object.
I have the isAttacking bool set up in the animator and it is set up as true for the transition from walking to attacking and false for the transition back to walking.
I have checked all of the scripts through github to see that I have written the code correctly and I have gone back and watched lecture 150 through 161 again to see if I have missed anything and yet I am still stuck. Feeling a little lost in the Glitch Garden Arggggggggg!!!
Any help would be appreciated.