#pragma strict
var score : int = 0;
function Start () {
}
function Update() {
score++;
guiText.text = "Score = 0:" +score;
}
function OnControllerColliderHit(col:Collision){
if(col.gameObject.tag == "GUI"){
score -=300;
Destroy(col.gameObject);
Debug.Log("stain");
}
}
function OnControllerColliderHit is not being called somehow
how do i make the score decrease by 300 everytime the player collides with something?