Object Wont move to position

For some reason, the object will not move to the correct position. yes I have put everything in the right place! Its just the object wont move. Can someone tell me whats wrong with the script please?:

var distance = Vector3.Distance(Player2.transform.position, transform.position);
var curposition = transform.position; 
var Sandy = gameObject;
var Player2 = gameObject;
function Start(){

}

function Update(){
distance = Vector3.Distance(Player2.transform.position, transform.position);
 curposition = transform.position; 
 if(distance <= 2){
 Sandy.transform.position = curposition;
}
}

Its Ok fixed it. I forgot about the Object having another script on it wich always updates its position to a specific place. Sorry!