FPS Micro Game AI missing reference exception error

Using the FPS Micro Game I tried creating 2 different teams of enemies that fight each other using the included Actor affiliation script. Problem is that when an enemy kills another enemy it throws a missing reference error from the AI script. I assume it’s trying to reference the game object it’s attacking after the target object has been destroyed. I’ve tried a couple of different null checks as a solution with no luck. Still throws the error for the same line of code.

If anyone has any idea’s, specifically someone with experience with the FPS micro game I sure would appreciate it.

Ok I solved it with some help but it’s surprisingly simple. In the code just use gameObject.SetActive(false) and if you want to destroy the game object use Destory(gameObject, “x”); after the SetActive(false). “x” being whatever number you want, or a public float even.