how can i put this as a script

if player hit game that tag destroy gameobject cube

please write questions with punctuation grammar and sense so that we can understand and answer them for you

1 Answer

1
//C#
void OnTriggerEnter(Collider other)
{
    if(other.tag == "Player")
    {
        Destory(this.gameObject);
    }
}

Something like that.