sentrygun script can it target multiple enemys?

hey guys this sentry gun script is added to my railgun it works with one game object that has bin tagged by Enemys That have a tag Enemy

but i have more than one gameobjects tagged as Enenmy and the sentry gun picks only the first one not all the Enemys how can i do this

function Start () {
	if (target == null && GameObject.FindWithTag("Enemy"))
		target = GameObject.FindWithTag("Enemy").transform;
					gameObject1.active = false;

I would add a sphere collider, set it as a trigger. Use that as your sentry range.

OnTriggerEnter – ArrayOrList.Add(TheEnemy)
OnTriggerExit(and on enemy death) – ArrayOrList.Remove(TheEnemy)

Sentry should then target ArrayOrList[0] or do a foreach if you want to target all of them at the same time.

OnTriggerExit should be used when the enemy walks out of the radius. But, if you kill the enemy, the collider/rigidbody would still be present unless you make them go poof.

On Enemy Death, have it remove itself from the same array/list.