how to move my camera...

Hello guys

I'm just practising with unity and creating very easy scripts. I have created a Camera.. named MyCamera. So I want to move it.. once I clicked a button in my GUI. So I created... my js script... declared my button in my OnGUI function. now: in the OnGUI I declared:

theCamera = GetComponent("MyCamera");

and to change it I thought to use:

theCamera.transform.Translate(Vector3(0,10,0)); but... Unity returns me a message that It's not possible to access an object in this way...so... any suggestion? :)

Many thanks. Giancarlo

Instead of:

`theCamera = GetComponent("MyCamera");`

use

theCamera = Camera.main.gameObject;

add this code to camera script

if (Input.GetKey (KeyCode.UpArrow)) {
handPlay = GameObject.Find(“gol”); // name your object

	   var   psx= handPlay.transform.position.x;
	   var   psy= handPlay.transform.position.y;
	   var  psz= handPlay.transform.position.z;

	
		 var TellCamNextLocation2 : Vector3 = Vector3 (psx,500, psz);
		 Camera.mainCamera.transform.position = TellCamNextLocation2 ;
		 
		 transform.position=TellCamNextLocation2;
		 
		 
		 
	  }