Hey everyone. I’m having a weird issue with my checkpoint script. In the transform.position = vector3 command it continues to tell me I need to replace the = with : … This is really getting on my nerves. I’ve looked through the script over and over but am lost with it. Any help would be much appreciated.
private var originalSpawn : boolean = true;
private var respawn2 : boolean;
private var respawn1 : boolean;
function OnTriggerEnter(hit : Collider)
enter code here
{
if (other.gameObject.tag == "Checkpoint1")
{
originalSpawn = false;
respawn1 = true;
respawn2 = false;
}
if (respawn1 == true)
{
{
transform.position = Vector3(187.2115, 15.21173, 158.192);
}
}
if (other.gameObject.tag == "Checkpoint2")
{
originalSpawn = false;
respawn2 = true;
respawn1 = false;
}
if (respawn2 == true)
{
{
transform.position = Vector3(187.2115, 15.21173, 14.37813);
}
}
}