Making a mob spawner, all mobs share damage...?

Hello everyone this is my first project, I have a small issue. I use an invisible game object as my spawner that creates a new enemy within a radius every 5 seconds.

This works great but the problem is the monsters it spawns dont have their own health value, I am using an instantiate command to spawn a clone of a prefab and my players projectile it shoots has a trigger. Every mob has a health script because of what I put on the prefab.

I have the trigger set to on collision, send message react to my mob health script.The react function in the mob health script causes mobhp to get subtracted by 1 and upon hitting 0 it destroys (this) game object.

The problem I am having is if there is more then 1 mob and I shoot it 3 times it kills a random mob and not always the one I hit. How can I fix this?

Thank you in advance for anyone that can help me.

If youre using send message, it could be sending it to every gameobject that has the script. I encountered this issue before attempting to do something similar.

Are you using Find to get info about the target hit? That’s a frequent error: Find returns info about the first object it finds, not the one hit. If so, SendMessage to the object hit (code attached to the projectile):

function OnTriggerEnter(other: Collider){
  if (other.tag == "Mob"){ // if object hit is tagged "Mob"...
    // SendMessage to it
    other.SendMessage("ApplyDamage", 10, SendMessageOptions.DontRequireReceiver);
  }
}