Need a new method for tageting dont know how to do others

I am making a tower defence game, my towers are using collider system to target the enemys but my problem is when a enemy is killed inside the collider(it is a sphere collider) it will not target the next enemy if i move the enemy outside then inside the collider agian it will target, and it keeps when i spawn one with my turret spawn script aiming way to much to the right and it is for all spawned turrets
Here is the script

using UnityEngine;
using System.Collections;

public class Ground_Turret : MonoBehaviour {

public GameObject myProjectile;
public float reloadTime = 1f;
public float turnSpeed = 5f;
public float firePauseTime = .25f;

public float errorAmount = .001f;
public Transform myTarget;
public Transform[] muzzlePositions;
public Transform turretBall;

private float nextFireTime;
private float nextMoveTime;
private Quaternion desiredRotation;
private float aimError;

void  Start (){

}

void  Update (){
	if(myTarget)
	{
		if(Time.time >= nextMoveTime)
		{
			CalculateAimPosition(myTarget.position);
			turretBall.rotation = Quaternion.Lerp(turretBall.rotation, desiredRotation, Time.deltaTime*turnSpeed);
		}
		
		if(Time.time >= nextFireTime)
		{
			FireProjectile();
		}
	}
}

void  OnTriggerEnter ( Collider other  ){
	if(other.gameObject.tag == "Ground Enemy")
	{
		nextFireTime = Time.time+(reloadTime*.5f);
		myTarget = other.gameObject.transform;
	}
}

void  OnTriggerExit ( Collider other  ){
	if(other.gameObject.transform == myTarget)
	{
		myTarget = null;
	}
}

void  CalculateAimPosition ( Vector3 targetPos  ){	
	Vector3 aimPoint= new Vector3(targetPos.x+aimError, targetPos.y+aimError+1700//need to add 1700 or it is gonna aim stright down the ground
			, targetPos.z+aimError);
	desiredRotation = Quaternion.LookRotation(aimPoint);
}

void  CalculateAimError (){
	aimError = Random.Range(-errorAmount, errorAmount);	
}

void  FireProjectile (){
	nextFireTime = Time.time+reloadTime;
	nextMoveTime = Time.time+firePauseTime;	
	CalculateAimError();
	
	foreach(Transform theMuzzlePos in muzzlePositions)
        {
            Instantiate(myProjectile, theMuzzlePos.position, theMuzzlePos.rotation);
        }
}
}

It looks like myTarget never changes from when the first enemy enters the collider. You need to check for when the enemy you shoot dies to reset myTarget. Something like this would work,

void CheckEnemyHealth(GameObject enemy)
    {
        if (enemy.GetComponent<Health>().health < 0)
        {
            myTarget = null;
        }
    }

You could check each time you shoot to see if you kill the enemy, then you might want to setup a list to keep track of all the enemies that have entered your trigger zone, the then remove them from the list when they leave. If this is for mobile then GetComponent might not be the best choice.

I would move away from the trigger event method of targetting. Something like this should work…

Transform CurrentTarget;
public float Range = 100;

void Start()
{
  InvokeRepeating("FindTarget", 0.25f, 0.25f);
}

void FindTarget()
{
  if(CurrentTarget == null)
  {
     foreach(Collider other in Physics.OverlapSphere(transform.position, Range))
     {
       if(other.gameObject.tag == "Ground Enemy")
       {
          CurrentTarget = other.transform;
          return;
       }
     }
  } 

}

void Update()
{
  if(CurrentTarget != null) 
  {
     if(Vector3.Distance(transform.position, CurrentTarget.postion) > Range)
        CurrentTarget = null;
     else {
        ShootAtTarget();
     }
  }
}

void ShootAtTarget()
{

}