How do I make a respawn system?

I am new to Unity3d and I’m making a game called “The Capsules”. I have a health system that I made but I can’t make a respawn system. I just want a simple code that makes me respawn after my health hits 0. :slight_smile:
My heath code:

var curHealth : int = 100;
var maxHealth : int = 100;

var healthtext : GUIText;

function Start () {

healthRegen();

}

function Update () {

healthtext.text = curHealth + " / " + maxHealth;

if(curHealth < 0 ) {

curHealth = 0;

}

if(curHealth > 100) {

curHealth = 100;

}

if(Input.GetKeyDown(“e”)) {

curHealth -= 1;

}

}

function healthRegen () {

for(i=1;i>0;i++) {

yield WaitForSeconds(2.5);

if(curHealth < maxHealth) {

curHealth++;

}

}

}

…sorry, I know it is long. Please, I know I’m a noob. :frowning:

~Max

Honestly i do not understand what actually you are trying to say. If you are looking to respawn or instantiate a game object, look into the following Url.

Please explain your problem a bit more, so people here can help.