Prefab Destroyed

When I need to destroy some blocks that are Generated by the prefab, the prefab is also destroyed. How can I change this?` public void DestroyBlocks()
{

        GameObject[] objects = GameObject.FindGameObjectsWithTag("Obstacle");
        foreach (GameObject obj in objects)
        {
            Destroy(obj);
        }

`
That is all I have now. Please note that the Prefab has a tag Obstacle.

Thanks

Only the objects that you want to destroy must have this tag. If the prefab has the tag “Obstacle” it will also be destroyed. I don’t know the script with the generation of the blocks but in most cases you can tag your gameObject.

YourGameObject.tag = "Obstacle";

Hope this was helpful