ChildRemoved

Constructor:

ChildRemoved(childobject)

Description

Triggered when a child object is removed.

Parameters

Name Type Description
childobject RWObject The child object that is removed

Examples

Create a folder and add a child part object under it. Change the part color when removed.

local folder = RWObject.Create("Folder") -- create a folder
folder.Parent = WorkSpace
local part = RWObject.Create("Part") -- create a part object
part.Position = Vector3.New(1,2,1)
part.Parent = folder -- set the part object as the child of the folder
folder.ChildRemoved:Connect(function(child) -- triggered when the child object is removed from the folder
    child.Color = Vector3.New(255,0,0)
end)
wait(2) -- wait 2 seconds
part.Parent = WorkSpace -- remove the part object from the folder