Set camera position with: transform.position ? Changes back after done clicking.

Hi, I want to set my camera position when this button is pressed. My problem is not the button press and what not but rather keeping the position.

On the 3D button I have this in one part of the script:

void OnMouseDown() {
GameObject.Find("Main Camera").transform.position = new Vector3(0, 20, 0);
	}

I am completely new to Unity and coding so I could be doing something silly, as when I click the button I see it change for a sec but then goes back as soon as im done clicking.

Thanks in advance!

Had other script affecting camera, had to enable it after making location changes.