PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

ChildRemoved

Fires after a child is removed from this Instance.

Removed refers to when an object’s parent is changed from this Instance to something other than this Instance. Note, this event will also fire when a child is destroyed (using Instance/Destroy) as the destroy function sets an object’s parent to nil.

This function only works for immediate children of the Instance. For a function that captures all descendants, use Instance/DescendantRemoved.

See also Instance/ChildAdded.

Parameters

Name Type Default Description

The Instance that has been removed.


Code Samples


Instance.ChildRemoved

This snippet prints the names of objects as they are removed from the Workspace: