Remove (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>NXTBoy
No edit summary
>NXTBoy
Float clear
Line 5: Line 5:
|object = [[Instance]]
|object = [[Instance]]
}}</onlyinclude>
}}</onlyinclude>
{{clear floats}}
{{clear floats}}
{{Example|<pre>
{{Example|<pre>
function onTouched(hit)
function onTouched(hit)

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)