If your variable *scoreCount* isn't already both *public* and *static* you could do that, which makes it accessible from the second script.
The *NullReferenceException* can easily be solved by using the function *GetComponent()*. The way to do that would be to declare a variable in the top of your script.
var levelMaster : LevelMaster;
The above code is what you already have.
In the *Start()* function you should put the following code.
levelMaster = GetComponent();
This should make the reference correct. The above is similar to instantiating a class which is shown below.
var levelMaster = new LevelMaster();
If anything of what I've written is wrong, please feel free to correct me. Let me know if this solved your problem.
Trending Articles
More Pages to Explore .....