Remove (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>NXTBoy
Float clear
>Camoy
Don't need category
Line 1: Line 1:
<onlyinclude>{{Method
<onlyinclude>{{Method|name = Remove
|name = Remove
|arguments  =
|arguments  =
|description = Sets the Parent property to [[nil]] and calls Remove() on all children.
|description = Sets the Parent property to [[nil]] and calls Remove() on all children.
Line 13: Line 12:
script.Parent.Touched:connect(onTouched)
script.Parent.Touched:connect(onTouched)
</pre>}}
</pre>}}
[[Category:Methods]]

Revision as of 15:31, 30 August 2010

Remove( )
Returns nil
Description: Sets the Parent property to nil and calls Remove() on all children.
Member of: [[RBX.lua.Instance (Object)|Instance]]
Example
function onTouched(hit)
  hit:Remove()
end

script.Parent.Touched:connect(onTouched)