void OnTriggerEnter(Collider theTrigger){
if (theTrigger.gameObject.name == “Player”){
PlayerHitScript.coin_count += 1;
Destroy(this.gameObject);
}
}
The code works by a coin drops after you kill a monster, and if you run into the coin it’s supose to be destroyed. The code works if you run into the coin within like a second of killing the monster but if you kill it, wait a couple seconds, then run into the coin it just stays there and doesn’t disappear, anyone know why?