Hey I have two gameObjects that's going to collide to eachOther I want to how to make one destroy the other on collision. Here is what I got. I'm new to coding. Also there is a error "Play".
var Hit : GameObject;
var sound : AudioClip;
function OnCollisionEnter (collision : Collision)
{
if (collision.gameObject.tag == "Destroy");
Destroy (gameObject);
Play.AudioClip;
}
↧