Accessing other GameObjects Script Variables

Hi there! I am kinda new at this but i have a script here. But i always get a NullReferenceException Everytime i start up the Game :(. I want my Script to Access Other GameObject Variable.

Any Ideas to fix it :)?

  • Yohan

var OtherComponent : Component ;

OtherComponent = gameObject.GetComponent ( ScriptName ) ;