ChildAdded

Constructor:

ChildAdded(childobject)

Description

Triggered when a child object is added.

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 added.

local folder = RWObject.Create("Folder") -- create a folder
folder.ChildAdded:Connect(function(child) -- triggered when the child object is added under the folder
    child.Color = Vector3.New(255,0,0)
end)
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