ChildRemoved (Event): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>SCARFACIAL
No edit summary
>JulienDethurens
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<onlyinclude>{{Event|name = ChildRemoved
<onlyinclude>{{Event|name = ChildRemoved
|arguments = [[Instance]] ''child''
|arguments = [[Instance]] <var>child</var>
|description = Fired after a child is removed.
|description = Fired when a child is removed from the object.
|object = Instance
|object = Instance
}}</onlyinclude>
}}</onlyinclude>
Line 7: Line 7:
{{clear floats}}
{{clear floats}}


{{Example|<pre>
== Example ==
local function onChildRemoved(child)
  print(child.Name)
end


game.Workspace.ChildRemoved:connect(onChildRemoved)
This code will print the name of any child that is removed from the [[Workspace]]:
</pre>}}
{{code|=
Workspace.ChildRemoved:connect(function(child)
print(child)
end)
}}


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

Latest revision as of 06:07, 10 April 2012

ChildRemoved ( Instance child )
Description Fired when a child is removed from the object.
Member of: Instance


Example

This code will print the name of any child that is removed from the Workspace:

Workspace.ChildRemoved:connect(function(child)
	print(child)
end)