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
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{ImproperArchive}}
{|
|<onlyinclude>
{{Function|
name                  = Remove
|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]]

Latest revision as of 12:30, 11 December 2024

Function
Syntax Remove( )
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)