I need a script which will allow my enemies to respawn when killed foreve

I need a script which will allow my enemies to respawn when killed foreve

I highly doubt anyone will just give you a script. That’s not what this site is for. But here is one way to achieve this:

  1. If you want the exact same # of enemies present at all times create a counter retaining your enemy count.
  2. Automatically instantiate a new enemy whenever one enemy is destroyed. You can choose a random spawn point using random.range and apply a vector3 or you can choose a desired spawn point by physically selecting the spawn position in your game world.

It’s really that simple. If you do not know how to script then I suggest reading through some tutorials. That’s how I began. Just look up Instantiate, Destroy and Transform in the unity docs. That’s all you will need to know how to do this.