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:
{{ImproperArchive}}
{|
|<onlyinclude>
{{Function|
name                  = Clone
|arguments            =
|returns              = n/a
|description          = Sets the Parent property to nil and calls Remove() on all children
|object              = Global
|}}</onlyinclude>
|}


You call :remove() on a part and it deletes it. Simple as that.
==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

Function
Syntax Clone( )
Returns n/a
Description: Sets the Parent property to nil and calls Remove() on all children
In Object: Global


Example


function onTouched(hit)
 script.Parent:Remove()
end

script.Parent.Touched:connect(onTouched)