why doesent my javascript unity code work

i wont my code to make enemy look at you and chase you but it doesn’t work the enemy just stays in that one spot can you tell me whats wrong with this code and if there’s something wrong can you re-wright the correct code for me code below

#pragma strict

var theplayer : GameObject;
var speed : float;
var range : int;
function Update(){

range=Vector3.Distance(theplayer.transform.position,transform.position);

if(range<99999999999){
transform.LookAt(theplayer.transform.position);

}

if(range<99999999999 && range>15){
transform.Translate(-Vector3.forward*speed);

}

if(range<12){
transform.Translate(-Vector3.forward*speed);

}

}

var theplayer : GameObject;
var speed : float = 10;
var range : float;

function Update(){
    Debug.Log('spped:'+speed+' range: '+range);
    range	=	Vector3.Distance(theplayer.transform.position,transform.position);
    
    if(range<99999999999){ 
		 Debug.Log('range<99999999999 turning?');
		transform.LookAt(theplayer.transform.position);
    
    }
    
    if(range<99999999999 && range>15){ 
		Debug.Log('Debug.Log('range<99999999999') backwards?');
		transform.Translate(-Vector3.forward*speed);
    
    }
    
    if(range<12){ 
		Debug.Log('range<12)');
		transform.Translate(-Vector3.forward*speed);
    
    }
    
   }

Test that. And have you tripple checked the inspector values