variable scope problem

I would like to invoke from another script ( Switch ) a boolean called “opened”. I would like to know what I am doing wrong as my variable “open” it’s not taking value true.

#pragma strict

var open;
var opened : boolean = false;

function Start () {
	
	var yes : Switch = GetComponent(Switch);  
	open = yes.opened;
	
}

function Update () {

	if( open == true){
		animation.Play("RockMove");
		opened = true;
		}

}

Thank You.

EDIT

:I have tryied everything I could

static .1

-Use-and142062-d.com/threads/3http://forum.unity .2

change-a-variable-of-another-script function Start () { // Find the OtherScript which is .3 : attached to any game object in the scene. var other ;)OtherScript = FindObjectOfType(OtherScript

} ;)(other.DoSomething

Q66Scripts : http://pastebin.com/QFLzS
Yftk7http://pastebin.com/DkH

try this champ

#pragma strict
private var otherScript :Start;
function Awake()
{
otherScript = GetComponent(Switch);
if( otherScript == null ) Debug.Log("SOMETHING IS WRONG");
}

function Update ()
{
if( otherScript.opened )
Debug.Log("the variable is true");
else
Debug.Log("the variable is false");
}