ChildAdded (Event): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy
Removed usage head
>Camoy
Format/Example
Line 1: Line 1:
{|
{|
|<onlyinclude>{{Event|name = ChildAdded
|<onlyinclude>{{Event|name = ChildAdded
|arguments = [[Instance]] Child
|arguments = [[Instance]] ''child''
|description = Fired after a child is added.
|description = Fired after a child is added.
|object = [[Instance]]
|object = [[Instance]]

Revision as of 13:52, 29 August 2010

ChildAdded ( Instance child )
Description Fired after a child is added.
Member of: [[RBX.lua.Instance (Object)|Instance]]

Description

Event is triggered when a new child has this object set as a parent. It applies only to immediate children and not other Descendants. (See DescendantAdded)

Example
function onChildAdded(child)
  print (child.Name)
end

game.Workspace.ChildAdded:connect(onChildAdded)