static var Counter7 : float = 1;
function Update () {
if (Counter7 == 0)
{
print ("works");
Destroy(gameObject);
}
}
Test2:
//var SecondCounter : float; //this not needed
//SecondCounter = Test.Counter7 //here we are just copying the value, not modifying
function OnMouseUp()
{
Test.Counter7 = 0; //modify the static value
}