destroy script destroying entire enemy.

My instantiations stop after 1 or 2 spawns, and I want them to kepp spawning forever thru the game…

I think its because I have the destroy piece of code in this script, but what can I do I need them to die after collision or they will be hundreds on screen like before , as usual when dead a enemy must die and disappear so what do I do?
I think the destroy code is destroying the entire enemy player not just the dead instance like I want

you see I want the enemys to keep spawning but of course when killed by player they must disappear.
please help

2d game
I have this script on the enemy prefab and in scene enemys

using UnityEngine;
using

I don’t think your instantiation problem has anything to do with the game object being destroyed, i think it has something to do with the way you’re instantiating the objects.
Share your instantiate script so we can see if there’s any problems with that.

Also, InvokeRepeate is a good way to have functions being called continuously.

Here this is the the ht eht e