Destroying a gameobject using the transform component

I came across an error caused by me cloning a bunch of objects and deleting them with
Apparently it wont destroy the object, so I tried to use the .gameObject variable, didn’t work (told me that it wasn’t existent in objects). Any way around this?

You can’t destroy a Transform (component of GameObject), only the GameObject itself. Therefore getting the GameObject that the Transform component is attached to will make it possible to destroy it.


Note: I am aware that the answer was already posted as a comment, but an answer is easier to see in the future.