How to teleport a object

Hi, I want to teleport my player to a tactical insertion when the health is equal to 0 when the player hits a death barrier. But either it keeps teleporting my player to a position a bit away from the tactical insertion, or I keep falling under the map. So how do I make this work correctly? Here’s my script :

var TactScript : ThrowTact;

static var Health : float = 100.0f;

var DefSpawn : Vector3;

var TactSpawn : Transform;

function Start () {

}

function Update () {

  if(Health == 0 && TactScript.HasTact == true){
  transform.localPosition = DefSpawn;
  Health = 100;
  }

  else
  
  if(Health == 0 && TactScript.HasTact == false){
  this.gameObject.transform.localPosition = TactSpawn.transform.position;
  Health = 100;
  }

}

I’m not sure what a “tactical insertion” is, but you just store the Vector3 where you want to teleport to, and then set the object’s transform.position to this Vector3.