Transform translate

Hi!!
I need help. I have one question. How to make one object(button) translate to other position when we click that object one time(function OnMouseDown), the object will translate to the other position. Then, we click the object again, then the object will return to the original position. Like push button.

Here are my scripts:

function  OnMouseDown() {
// Move the object forward along its y axis 
    transform.Translate(0,0,-0.05);
	audio.Play();
	
} 

Thanks. :slight_smile:

//declare this guy:

private float direction = -1f;

//what ever you gotta do

transform.Translate(Vector3(0,0,direction*0.05));

direction = direction * -1;