This script which I have wrote Changes the transform of whatever the scripts attached to when the RMB is clicked, but what I want is for it to snap back to its starting position when you stop holding the RMB down, can anyone help me with this?
function Update () {
if(Input.GetButtonDown(“Fire2”)){
transform.Translate (0.31,0.21,0);
}
}