Hello, after few days I gave up and came to you guys :smiley:
What I am trying to do is:

In Script 1 I want to compare variable:

if(Variable WOOD from Script2 >= 50)
     DoSomething

In Script2 which is attached to another object I have variable WOOD.

var WOOD = 100;

I need to compare Variable wood I tried to ask my friend, I searched whole google, Found few posts tried every one of them Still the same Error:
NullReferenceException: Object reference not set to an instance of an object

Pleasee help

// You can find a reference to Script2 like this, assuming it is attached to some game object in your scene.
var script2 : Script2 = FindObjectOfType(Script2);

// You should always check to make sure script2 was found before trying to use it
if(script2)
{
   if(script2.WOOD >= 50)
   {
      // Do Something
   }
}
else
{
   // You didn't find a Script2 in your scene
}