Change rigidbody object's position on collsion

So basically I want to reset a rigidbody object’s position to it’s original state without actually restarting the level. I have a character which can move the rigidbody object and when he falls down, (this is where the collision takes place) I want the rigidbody object to go back to it’s original position. Now, the problem I am facing is that, when the collision happens, the rigidbody object does not change it’s position as I have defined in the script. Instead it get’s teleported somewhere else in the scene which is weird. I am very much new to scripting and it would be really nice if someone could help me out. Thank you in advance.

alt text

function OnTriggerEnter (other : Collider) {
    if(other.tag == "Player"){
    GameObject.Find("cuber").transform.position = Vector3(34, 0, 0);

    }

}

The best solution to your problem is using spawn points
Don’t be scared! spawn points are just empty gameobjects which you can use their Transform component to respawn your character from them.
Just make some spawn points in unity editor and use them in your scrpit like this:

var mySpawnPoint: Transform; // assign a gameObject from inspector

function OnTriggerEnter (other : Collider) {
    if(other.tag == "Player"){
    GameObject.Find("cuber").transform.position = mySpawnPoint.position;
    GameObject.Find("cuber").transform.rotation = mySpawnPoint.rotation;
 
    }
 
}

Using this strategy prevents unwanted behaviours as you are facing, and also lets you deal with real position and rotation instead of Vector3 and nasty Quaternions