global variables

I have created a global variable in my catcher script.

public static var xPosition:float;
public static var yPosition:float;

function OnTriggerEnter(theObject:Collider){
if(theObject.gameObject.name == “Main Char”){
var m:GameObject = GameObject.Find(“Main Char”);
m.transform.position.x = xPosition ;
m.transform.position.y = yPosition ;
}

i want to access this in the other scritp and add the x location in it.

i m doing it like this

function OnTriggerEnter(theObject:Collider) {
if(theObject.gameObject.name == “Main Char”){
gameObject.transform.position.x = catcher.xPosition;
gameObject.transform.position.y = catcher.yPosition;
}

}

basically i m trying to make it a checkpoint using a global variable…
this doesnot work . :frowning:
thanks in advance

///in the sciFiScript.js
public static var xxy bool;
///To access it from the thrillerScript.js
sciFiScript.xxy = true;

thanks alot… i got mymistake . i was assigning gameobject the catcher.xPosition.this was wrong.actually it is catcher.xPosition = gameObject.transform etc…
you cleared it to me…