I want to teleport a car and I try to use the typical teleportation script, which would be this:
var TeleportEndPoint : Transform; //drag your point to here in the Inspector
// var spawnPoint : Vector3 = Vector3(0, 10, 0);
function OnTriggerEnter(other : Collider)
{
if (other.gameObject.tag == "Player")
{
other.transform.position = TeleportEndPoint.position;
// other.transform.position = spawnPoint; // fixed vector method
}
}
I follow all the steps but when I pass with the car that has the tag of player
, it does not transport. Any ideas?