Before this script is working but after a day it doesn’t work ? why? i try to change the object but no change happen .
Someone can help me . Thanks.
var scoretxt:GUIText;
var customtxt: GUIStyle;
var score:int;
function OnTriggerEnter (other : Collider) {
if(other.gameObject.tag== “p2”)
{
Destroy(other.gameObject);
score +=50;
scoretxt.text = score.ToString();
print(score);
gameObject.Find(“Balisong”).GetComponent(“GUITexture”).enabled = true;
}
else if(other.gameObject.tag == “c1”)
{
Destroy(other.gameObject);
score +=50;
scoretxt.text = score.ToString();
print(score);
gameObject.Find(“basilcachurch”).GetComponent(“GUITexture”).enabled = true;
}
else if(other.gameObject.tag == “c3”)
{
Destroy(other.gameObject);
score +=50;
scoretxt.text = score.ToString();
print(score);
gameObject.Find(“GenrealMalvar”).GetComponent(“GUITexture”).enabled = true;
}
else if(other.gameObject.tag == “c2”)
{
Destroy(other.gameObject);
score +=75;
scoretxt.text = score.ToString();
print(score);
gameObject.Find(“kapengbarako”).GetComponent(“GUITexture”).enabled = true;
}
}