How do I trigger the collider properly in unity3d

I am doing an on trigger exit . When the player enter the enemy ai collider all the enemy ai do is just turn to the player . It doesn’t move to the player at all . Here is my code :

using UnityEngine;
using System.Collections;

public class Enemy11 : MonoBehaviour {
public Transform Player;
static Animator anim;

	void Start () {
   
   anim = GetComponent<Animator> ();
	}
	

	void OnTriggerExit (Collider other) 
	{
	
	float speed = 0.2f;
           this.transform.Translate(0,0,speed * Time.deltaTime);

          if (Vector3.Distance(Player.position, this.transform.position) < 8)
          {
              Vector3 direction = Player.position - this.transform.position;
              direction.y = 0;
              this.transform.rotation = Quaternion.Slerp (this.transform.rotation,Quaternion.LookRotation(direction), 0.1f);
              
              anim.SetBool("isIdle",false);
              if(direction.magnitude > 2.6 )
              {
                  this.transform.Translate(0,0,0.09f);
                  anim.SetBool("isMoving",true);
                  anim.SetBool("isAttack",false);
                  }
              else
              {
                  anim.SetBool("isAttack",true);
                  anim.SetBool("isMoving",false);
                  
              }
          }
         else
         {
             anim.SetBool("isIdle",true);
             anim.SetBool("isMoving",false);
             anim.SetBool("isAttack",false);
             
         }
      
 }
	
	
	}

what shape is your trigger? huge square that enemies are in?
OnTriggerExit is executed only one time! Use OnTriggerStay if you want that enemies attack to you when you are in the trigger or if your trigger is only one line(narrow square) that determines the frontline.Use OnTriggerExit but it is executed only one time. So you need to define a boolean attack_active=true into it and write:

void Start(){
attack_active=false;
}
void Update(){
if(attack_active){
...
do something (attack)
}
}
void OnTriggerExit(Collider coll){
if(coll.gameobject.tag=="Player"){
attack_active=true;
}
}