Respawn after falling
I and a few of my friends are working on a roll-a-ball spin off and I want to make it where if the ball(Player) falls off and he respawns to his original position. Can you please help me with the script? We are very new and online tutorials are not working. Thank you!
Comment
Answer by jurgenhoorn · Sep 23, 2017 at 02:48 PM
try this, it works fine for me. and you can change the y< - 3 to anything u want void start () respawnPoint = transform.position;
void fixedupdate() if (transform.position.y < -3) {
die ();
}
void die ()
{
transform.position = respawnPoint;
}