Hello, I will a new scene, if my player’ score is 50, then come a new level. I have a First Person Controller, and it has a script:
var score = 0;
function OnTriggerEnter( other : Collider ) {
if (other.tag == "Coin") {
score += 10;
Destroy(other.gameObject);
}
}
if(score >= 50) {
Application.LoadLevel ("B");
}
If First Person Controller collide with a coin then it’s destroy, so it’s workink, but if I ,collected" them all, it’s nothing happen, the new scene no come. Please Help, what’s wrong?