Hi,
So basically I have a game where you have to collect items, and I give the players points depending on the object, but I am having trouble writing the code to make it destroy a specific object, just wondering if anyone could help me out. Here is my code currently:
`
void OnTriggerEnter(Collider theCollision)
{
GameObject collisionGO = theCollision.gameObject;
Destroy(collisionGO);
myPlayer.theScore++;
audio.Play();
}
`