ClearAllChildren (Method)

From Legacy Roblox Wiki
Revision as of 05:56, 7 April 2012 by >JulienDethurens (...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
ClearAllChildren( )
Returns nil
Description: Removes all descendants of the Instance, but leaves the Instance itself.
Member of: Instance


Example
model = game.Workspace.Model

in1 = Instance.new("Part", model)
in2 = Instance.new("Sparkles", model)

game.Workspace.Model:ClearAllChildren() --the part and sparkles in the model will be removed, but the model will remain