How to add value from other script?

I’m really confuse at GetComponent
This is what I’m gonna do

In Script A (value)

var MyValue1 : int = 10;

In Script B (call script A)

function OnTriggerEnter()
//calling script A and add a value of "MyValue1"

Someone tell me how to call Script A and add value …


you can also use singletons

public static moSelf;

void Awake()
  moSelf = this;

Then in your other script you can acess all the variables like this

classname.moSelf.variableName = whateverIwant