Remove (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Blocco
No edit summary
>NXTBoy
Fixed
Line 1: Line 1:
<onlyinclude>{{Method|name = Remove
<onlyinclude>{{Method
|name       = Remove
|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.
|object = [[Instance]]
|object     = Instance
}}</onlyinclude>
}}</onlyinclude>
{{clear floats}}
{{clear floats}}
Line 11: Line 12:
script.Parent.Touched:connect(onTouched)
script.Parent.Touched:connect(onTouched)
</pre>}}
</pre>}}
[[Category:Methods]]

Revision as of 09:01, 26 December 2010

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

script.Parent.Touched:connect(onTouched)