Remove (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy
No edit summary
>MrNicNac
Added an example that fits the method better.
Line 7: Line 7:
{{clear floats}}
{{clear floats}}


{{Example|<pre>
{{Example|This is an example of removing a part in the Workspace. Make sure there is one there before trying this.
function onTouched(hit)
<pre>
  hit:Remove()
Game.Workspace.Part:Remove()
end
</pre>
 
}}
script.Parent.Touched:connect(onTouched)
</pre>}}


[[Category:Methods]]
[[Category:Methods]]

Revision as of 14:19, 27 December 2010

Remove( )
Returns nil
Description: Sets the Parent property to nil and calls Remove() on all children.
Member of: Instance


Example
This is an example of removing a part in the Workspace. Make sure there is one there before trying this.
Game.Workspace.Part:Remove()