Hello, Im trying to make a scoring system in two parts, one that is attached to a GUIText and another that is attached to an object to be clicked in order to add up points.
This is what I currently have on the GUIText
var Counter : int = 0;
function onGUI(){
guiText.text = "Score: "+CountingCode.score;
}
and this is what is on the object to be clicked to get points
CountingCode.js
static var Counter : int = 0;
function OnMouseDown(){
Counter+=10;
}
When I click the afformentioned object with these scripts active nothing happens. Can someone please show me what is wrong?