ChildAdded (Event): Difference between revisions

From Goodblox Wiki
Jump to navigationJump to search
(Created page with "<onlyinclude>{{Event| name = ChildAdded |arguments = Instance Child |description = Fired after a child is added. |object...")
 
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{CatUp|Events}}
<onlyinclude>{{Event|
<onlyinclude>{{Event|
name                  = ChildAdded
name                  = ChildAdded
Line 5: Line 6:
|object              = Global
|object              = Global
}}</onlyinclude>
}}</onlyinclude>
<pre>
<pre>
function onChildAdded(child)
local function onChildAdded(child)
print (child.Name)
    print(child.Name)
end
end


game.Workspace.ChildAdded:connect(onChildAdded)
workspace.ChildAdded:connect(onChildAdded)
</pre>
</pre>


[[Category:Events]]
[[Category:Events]]

Latest revision as of 21:03, 23 September 2021

Event
Syntax ChildAdded( Instance Child )
Description: Fired after a child is added.
In Object: Global


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

workspace.ChildAdded:connect(onChildAdded)