Just a noobs question on variables [Solved]

Hello, just a quick question - can somebody tell me what is wrong here? when run the script Label shows “Points” “0” and, for example, “1” in the same time … counting is working but it still shows the “0” too

var points = "Points " ;
var count = 0;


function OnGUI () 
{
	GUI.Label (Rect (25, 25, 100, 30), points + count);
	
}

function AddCount ()
{
count += 1;
}


function OnTriggerEnter (other : Collider) 
{
AddCount ();
}

You must have some other script interfering. what you posted works exactly like you’d expect it to.

Ty for help :slight_smile:

Problem solved