Respawn Problem

I want a respawn script where when a player collide a object it will respawn its current position but i faced some problem here is my script
using UnityEngine;
using System.Collections;

public class Testrun : MonoBehaviour {

void OnTriggerEnter(Collider other)
{
	transform.position = Vector3(1019.62f, 80.53411f, -801.2841f);
}

}
and the problem is
error CS0119: Expression denotes a type', where a variable’, value' or method group’ was expected
i am new in scripting pls help me what i will do

add new keyword where you are creating Vector3.

like transform.position = new Vector3(1019.62f, 80.53411f, -801.2841f);

you have missed the “NEW” :slight_smile:

void OnTriggerEnter(Collider other)
{
    transform.position =new Vector3(1019.62f, 80.53411f, -801.2841f);
}