Object reference not set to an instance of an object

I keep getting an error every time i collide with the said object:

NullReferenceException: Object reference not set to an instance of an object
Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.String cacheKeyName, System.Type[] cacheKeyTypes, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.Object[] args, System.String cacheKeyName, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.GetProperty (System.Object target, System.String name)
UnityScript.Lang.UnityRuntimeServices.GetProperty (System.Object target, System.String name)
coin+$OnTriggerEnter2D$4+$.MoveNext () (at Assets/Scripts/coin.js:18)

This is the script causing the error:

 var pickupSound : AudioClip;
 var addedScore = 0.0f;
 var other : GameObject;
 other = GameObject.Find("ScoreBoard");
 
 function Start(){
 
 	
 
 }
 
 function OnTriggerEnter2D( hit : Collider2D )
 {
 	
    if(hit.gameObject.tag == "Player")
      {
      		
        	other.score += addedScore;
            yield WaitForSeconds(1);
			gameObject.SetActive(false);
         }
      }

This line seems to be causing it:

other = GameObject.Find("ScoreBoard");

I have moved this line in and out of Update functions and Start functions, nothing seems to work.

You can move the line back to the start function. The problem is not its position, but there are a couple things here:

First, it may be that GameObject.Find can’t actually find any object named “ScoreBoard” (check the name spelling, it’s case sensitive). Whenever you use any object you should first check if the reference is correct. Something like this:

other = GameObject.Find("ScoreBoard");
if(other != null) {
   // Do whatever you want to do with it...
}

The second problem here is that you are trying to assing a value to a property inside a script (that I suppose is attached to that object), but you are trying to do it on the object instead of on the script. You should get the script first, something like this:

var other: GameObject;
var scriptReference: ScriptName;
other = GameObject.Find("ScoreBoard");
if(other != null) {
   scriptReference = other.GetComponent("ScriptName");
   if(scriptReference != null) {
      scriptReference.score += addedScore;
   }
}