my box Collider is triggered and my object (player) has a RigidBody
this is the score display script
#pragma strict
static var Counter : int= 0;
var test =0;
function Update(){
test = Counter;
}
function OnGUI()
{
GUI.Label (Rect (10, 10, 110, 110), "Score: " + Counter);
}
and this is the trigger Script
function OnTriggerEnter(other : Collider)
{
if(other.tag == "Player")
{
scoreDisplay.Counter += 1;
}
}