Enemy ai script help?

I have a enemy ai script he is sup oust to follow you, but instead he just turns and follows you, He dose not walk towards you just follows your movement. I want him to chase you but idk what is wrong and also. the min distance works wrong if i set it to 1 it disappears before it gets to me and if i set it higher it disappears when i walk away. I hope you understand what i mean. Heres the code

 var Player : Transform;
 var MoveSpeed = 4;
 var MaxDist = 10;
 var MinDist = 5;
 
 
 
 
 function Start () 
 {
 
 }
 
 function Update () 
 {
     //Moves towrd player
	transform.LookAt (Player);
	if(Vector3.Distance(transform.position,Player.position ) >= MinDist) {
          
          transform.position += transform.forward * MoveSpeed*Time.deltaTime;
 
           
          if(Vector3.Distance(transform.position,Player.position) <= MaxDist)
              {
                 Destroy(this.gameObject);
              } 
    
       }
 }

and also i dont understand how to activate it by a trigger, like he stares at a wall then when i walk into the room he turn around not just dose it when i spawn thanks for any help!

how about doing it this way:

    function Update () 
      {
          //Moves towrd player
         transform.LookAt (Player);
    
    
    var dist = Vector3.Distance(transform.position, Player.position);

// if dist less than the max distance ( i am assuming the max distance id the trigger to chase or to stay idle)
    if( dist <= MaxDist) {
               
               transform.position += transform.forward * MoveSpeed*Time.deltaTime;
      }  // first if ends

//   if the distance between them less than the minimum allowed destroy it
               if( dist <= MinDist)
                   {
                      Destroy(this.gameObject);
                   } // second if ends
    
    } // update ends