Camera changes position when click on 3D text

Here is what i have. I have a main menu that looks like this

So i want when i click on the text “OPTIONS” the camera to move over to the table. I have already made the animation and here are the scripts i use.

function OnMouseUp()
{
transform.animation.Play(“Camera”);
}

i use this code in the 3d text but it changes the position of the text not the camera’s. I think i have to put a reference to the Main camera on the 3d text script. Anyone can help ?

You just can use this:

public void CameraMove(){
if(Input.getKey(1)){
Camera.maincamera.transform.Translate(Vector3.foward);
}
}

The ideia is: You can just use translate every click to go foward into table and back to the original position.

Oh nevermind, i added a box collider in the main camera moved it in the position of the 3d text and used the codes

function OnMouseUp()



{
animation.Play("Camera");
}