So I’m getting the error. NullReferenceException: Object reference not set to an instance of an object
Which I know means it’s not assigned correctly. The problem is, it looks like it’s all set up properly. I can’t figure out where I’m going wrong so i’ll run through the logic.
I have a projectile that fires (from the player) that has a script on it that if it hits it calls a PlayerPassiveAbility() method on the player that will call enemyHealth.TakeDamage(damage);
When it hits and calls that enemyHealth.TakeDamage(damage); though, that’s where I get the error.
Both scripts have public EnemyHealth enemyHealth; on them and they’re both set so I’m not sure why i’m getting this error.