Destroy parent when ball hit on child object

Hello people,

I have problem with destroying parent object when my ball hit on child (nothing happens).
This is my code:

void OnCollisionEnter (Collision coll)
{
GameObject hitObject = coll.gameObject;

if (hitObject == “Bad1”) //Bad1 is child of object name Scale (when I write “Scale”, my object is destroyed)
{
Destroy (hitObject);
Destroy (this.gameObject);
}
I hope for yours response.

Thanks,
Kind regards

I solved my problem with this code.

voidOnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag (“xxxxxxx”))
{
other.gameObject.SetActive (false);
Destroy (this.gameObject);
}
}

And don’t forget set checkmark on trigger for your objects.

Not the correct Answer