Re Enable C# script on camera

Hi there all would appreciate some insight. I have a 2 transform scripts i need to apply however one always obstructs the other. so i want have a button to turn one off when i want to use the other and reactivate it when im done. I have searched for hours to an answer unfortunately only finding work arounds such as parenting which are not useful in my case as the script is on a camera. I have moved the c# script to standard assets so javascript finds it.

var script : TouchOrbit = GetComponent(TouchOrbit);

function OnGUI() {
if (GUI.Button(Rect(360,50,50,30),"On")) 
script.enabled = false;

I would like an on/off button ideally but even making a second button with scribt.enabled = true doesnt work. Unfortunately once i disable the script i can’t re-enable it. I have also tried active instead of enable but that disables the whole camera. really appreciate some help in this matter

Place the script doing the activation on another object. Separate out that functionality. You can’t have a disabled script re enable itself. The scipt is not executing. Hold the script functions on the buttons themselves and then contact the script remotely with GetComponent to enable or disable it.