How can I make my player teleport to somewhere else on collision with object?

I am new to unity and I’m making a game where you drive a car to the end of this big lane, and there are lots of cubes that if you hit, the scene restarts. At the end of the lane I want the car to drive over a line and it teleports them to the next level (in the same scene). Please use simple terms as I’m very new to Unity :slight_smile: thx in advance.

Where the lane is, create a box collider and set it to trigger.

Now, create a script which will handle everything for you. Add Transform variable which will store the next level position. Add a method OnTriggerEnter (Collider col).

Inside it, you have to check if it is a car, not the cube. To do so, first assign a unique tag to your car. I assume you assign “car” tag. So the check looks like this: if (col.transform.root.CompareTag ("car")) if it is true, then you have to set the car position and rotation to the next level. Remember that transform variable we had before? So you would have to do col.transfor.root.position = thatTransformWeTalkedAbout.position and col.transfor.root.rotation = thatTransformWeTalkedAbout.rotation.

This should do all you want.