Property to check if an instance is destroyed or not

As a Roblox developer, it is currently too hard to …
Tell if an arbitrary instance is destroyed or not, simply listening to instance. Destroying is not enough. I do not want to have to cache the destroyed status of an arbitrary amount of objects, that defeats the purpose of destroying them.

If Roblox is able to address this issue, it would improve my development experience because …
it will be easier to migrate to the new destroy replication behavior, and I will not have to rewrite as much legacy code.

11 Likes

I totally want this feature and here is a post that really supports it which I made some time ago:

2 Likes

I check by indexing the parent.

if part.Parent then --not destroyed

This works in every case I’ve found, except for when objects are intentionally parented to nil (almost never), or not fully initialized yet (damn you player.Character!).

Are there other cases where this property would make sense?

It’s exactly because a nil parent doesn’t imply destruction that it doesn’t “work”. It’s not a safe or accurate strategy of determining when an instance is destroyed especially in complex cases where you have a lot of instance management going on. Developers shouldn’t have to guess or use hacks to differentiate a nil-parented instance from a destroyed one be it for compatibility or a genuine use case that shows up.

6 Likes