how to access other script varible

I am using the camera SmoothFollow script. My question is, when the player touches a game object's collider, then I want to change the distance on the camera script.

I am using this script:

function OnTriggerEnter (otherObject:Collider) {
otherscript = GetComponent(SmoothFollow);
otherscript.distance = 50;

but Unity is still giving me this error:

NullReferenceException: Object reference not set to an instance of an object Boo.Lang.Runtime.RuntimeServices.Dispatch (System.Object target, System.String cacheKeyName, System.Type[] cacheKeyTypes, System.Object[] args, Boo.Lang.Runtime.DispatcherFactory factory) [0x00000]

Presumably there is no SmoothFollow script attached to that object. You have to specify which object the SmoothFollow script is attached to. You can try

var otherscript = Camera.main.GetComponent(SmoothFollow);

if your camera is tagged MainCamera.