:Destroy() destroys Parent after an object is destroyed by FallenPartsDestroyHeight

If you create a Part/Model, parent it to another Model in workspace, then the child Part/Model falls into the void and is destroyed by FallenPartsDestroyHeight, calling :Destroy() on the child will destroy the parent IF the parent doesn’t have any other children.

Steps to reproduce:

  1. Create a part
  2. Parent the part to a model
  3. Drop the part into the void (destroy by FallenPartsDestroyHeight)
  4. Call :Destroy() on the part

Link (and download) to place file for reproduction. Check ServerScriptService:

destroyBug.rbxl (56.3 KB)

Notes:

  • This issue occurs on both the client and server.
  • This issue only seems to occur with Models as the Parent. I attempted a couple of other instances and neither of them have this issue.
  • In the place file, there is a flag called USE_ONLY_PART. If you set it to false, you can see that this issue also occurs with Models that are destroyed by FallenPartsDestroyHeight.

Expected behavior

When you call :Destroy() on an object, whether it is still in workspace or not, it should not destroy the parent. I imagine it should silently call the method or error.

Hi derpmonster83, thanks for your report!

As niche as it is, Models that have all their parts removed by FallenPartsDestroyHeight are intentionally removed from the Workspace (see Workspace#FallenPartsDestroyHeight). So the behavior you are seeing is intentional, and on my end happens whether or not I call :Destroy() on the part after its removed by the void.

That being said, if this behavior is causing a lot of friction in your development, please feel free to make a feature request to change this behavior!

Thanks again for your report!

2 Likes

Asking the obligatory “when is workspace.FallHeightEnabled going to actually start working?” here.

1 Like