Need help with respawn after falling.

In my game when the character falls he just keeps falling… I would like a code to put into a large box under the map that will reset the location of my character when the character collides with it. I am a complete noob so nothing to complicated please.

Thanks for replying so quick. I made the box a collider but i don’t know how to make a “transform”. How would i do so?

Make the box a trigger collider, make an empty transform at the top for the respawn point, and then use this-

void OnTriggerEnter(Collider other)
{
    other.transform.position = respawnPoint.position;
    if(other.rigidbody)
    {
        other.rigidbody.velocity = Vector3.zero;
    }
}

A trigger box can be unreliable because the player may over shoot the box, or may pass through it with out the collision being detected (for whatever reason). While if you get it big enough, it should pretty much always work, you have an issue if your map gets bigger and you forget to update the box.

I would attach a script to the character that respawns him/her/it when it passes a certain z-value.

var respawnHeight : float = 50;

function FixedUpdate() {
    if (transform.position.z < respawnHeight) {
        DoRespawn();
    }
}

Modify respawnHeight to be the value at which the player will respawn. Obviously you need to implement DoRespawn() yourself.