Make my enemy stop when he reaches me.

This is my EnemyAI script its just for some zombies, they don’t attack its for a scary walkthrough type of thing. Its just that they get on top of the palyer and then block the players view from the end credit. What can I change so that when they are a foot away they stop moving toward the player? And one other thing, that is less important now, they hover above the floor when walking over to me. And hover above/around my head. If its an easy fix post that to! Thanks in advance!

var target : Transform; //the enemy's target
 var moveSpeed = 3; //move speed
 var rotationSpeed = 3; //speed of turning
 var attackThreshold = 1.5; // distance within which to attack
 var chaseThreshold = 10; // distance within which to start chasing
 var giveUpThreshold = 20; // distance beyond which AI gives up
 var attackRepeatTime = 1; // delay between attacks when within range
 
 private var chasing = true;
 
 
 var myTransform : Transform; //current transform data of this enemy
 
 function Awake()
 {
     myTransform = transform; //cache transform data for easy access/preformance 
 }    
 
 function Start()
 {
      target = GameObject.FindWithTag("Player").transform; //target the player
 }
 
 function Update (){    
     // check distance to target every frame:1
     var distance = (target.position - myTransform.position).magnitude;
 
     if (chasing) {    
         //rotate to look at the player
         
         myTransform.rotation = Quaternion.Slerp(myTransform.rotation,
         Quaternion.LookRotation(target.position - myTransform.position), rotationSpeed*Time.deltaTime);
 			//Quaternion.LookRotation(target.position.x, myTransform.position.y, target.position.z) - myTransform.position);
 

         //move towards the player
         myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;

Not sure about how you are calculating distance, but I modified your script to calc the dist differently, and stop when it gets to 5 units to the player. You can adjust at the top variable section.

  var target : Transform; //the enemy's target
  var moveSpeed = 3; //move speed
  var rotationSpeed = 3; //speed of turning
  var attackThreshold = 1.5; // distance within which to attack
  var chaseThreshold = 10; // distance within which to start chasing
  var giveUpThreshold = 20; // distance beyond which AI gives up
  var attackRepeatTime = 1; // delay between attacks when within range
  var stopMoveThreshold = 5;
  private var chasing = true;
  
  
  var myTransform : Transform; //current transform data of this enemy
  
  function Awake()
  {
      myTransform = transform; //cache transform data for easy access/preformance 
  }    
  
  function Start()
  {
       target = GameObject.FindWithTag("Player").transform; //target the player
  }
  
  function Update (){    
      // check distance to target every frame:1
      //var distance = (target.position - myTransform.position).magnitude;
	  
      var distance = Vector3.Distance(target.transform.position, myTransform.transform.position);
	  chasing = stopMoveThreshold > 5;
	  
      if (chasing) {    
          //rotate to look at the player
          
          myTransform.rotation = Quaternion.Slerp(myTransform.rotation,
          Quaternion.LookRotation(target.position - myTransform.position), rotationSpeed*Time.deltaTime);
              //Quaternion.LookRotation(target.position.x, myTransform.position.y, target.position.z) - myTransform.position);
  
 
          //move towards the player
          myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;

float distance = Vector3.Distance(transform.position,target.position);

if(distance > range) // Move

your guy is flying because you are using transform to move him, use character controller so that it collides with environment.