Question by
saddlepiggy · Apr 23, 2016 at 10:49 AM ·
playerenemydamage
Enemy Isn't Hurting Player in Survival Shooter
Hello! I am trying to follow Unity's Survival Shooter tutorials, but can't get my enemy to hurt the player. It will follow, but won't hurt the player when he attacks. When I got to phase 7 and uncommented the all the code, that's when my enemy stopped hurting the player. I also get this error: NullReferenceException: Object reference not set to an instance of an object PlayerHealth.Update () (at Assets/Scripts/Player/PlayerHealth.cs:38)
How can I fix these problems? Thanks, saddlepiggy.
Comment