Remove (Function): Difference between revisions
From ROBLOX Wiki
Jump to navigationJump to search
Created page with "{{ImproperArchive}} You call :remove() on a part and it deletes it. Simple as that." |
No edit summary |
||
| Line 1: | Line 1: | ||
{{ | {| | ||
|<onlyinclude> | |||
{{Function| | |||
name = Clone | |||
|arguments = | |||
|returns = n/a | |||
|description = Sets the Parent property to nil and calls Remove() on all children | |||
|object = Global | |||
|}}</onlyinclude> | |||
|} | |||
==Example== | |||
<pre> | |||
function onTouched(hit) | |||
script.Parent:Remove() | |||
end | |||
script.Parent.Touched:connect(onTouched) | |||
</pre> | |||
[[Category:Functions]] | |||
Revision as of 12:29, 11 December 2024
| ||||||||||
Example
function onTouched(hit) script.Parent:Remove() end script.Parent.Touched:connect(onTouched)