DescendantRemoving (Event): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>SCARFACIAL
No edit summary
>JulienDethurens
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<onlyinclude>{{Event|name = DescendantRemoving
<onlyinclude>{{Event|name = DescendantRemoving
|arguments = [[Instance]] ''descendant''
|arguments = [[Instance]] <var>descendant</var>
|description = Fired before a descendant is removed.
|description = Fired when a descendant is being removed.
|object = Instance
|object = Instance
}}</onlyinclude>
}}</onlyinclude>
Line 7: Line 7:
{{clear floats}}
{{clear floats}}


{{Example|<pre>
== Example ==
local function onDescendantRemoving(ins)
  print(ins.Name)
end


game.Workspace.DescendantRemoving:connect(onDescendantRemoving)
This code would print the name of any descendant that gets removed from the Workspace:
</pre>}}
 
{{code|=
Workspace.DescendantRemoving:connect(function(descendant)
print(descendant)
end)
}}


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

Latest revision as of 06:09, 10 April 2012

DescendantRemoving ( Instance descendant )
Description Fired when a descendant is being removed.
Member of: Instance


Example

This code would print the name of any descendant that gets removed from the Workspace:

Workspace.DescendantRemoving:connect(function(descendant)
	print(descendant)
end)