Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Once all of the children inside the object are gone, does the parent stay or not?

I have a model & a script inside it, which destroys all of the children one by one. As I was about to write a script, which would check if the object is found or not however, I wanted to know whether the parent, which once had children, would stay in the workspace once all of them are gone. If the object does stay, is there a workaround this issue?

1 answer

define object ?, and if you remove its children the parent wont magically diseappear the workaround is just destroy the parent that will automatically destroy all its children

2 comments

0

In this case, object is a Model. I am aware that you can remove object's children whilst in Studio, and the parent would stay. However, I thought that doing the same in scripts would cause a different behaviour, which is why I was asking. Thank you for your reply

0

no its the same, you can mark this now as solved, Glad i could help!

This discussion is preserved as it was. New answers, comments, and votes are closed.