Remove (Function): Difference between revisions

From Goodblox Wiki
Jump to navigationJump to search
(Created page with "<onlyinclude>{{Function| name = Remove |arguments = |returns = n/a |description = Sets the Parent property to nil and ca...")
 
No edit summary
Line 9: Line 9:
==Example==
==Example==
<pre>
<pre>
 
function onTouched(hit)
function onTouched(hit)
  script.Parent:Remove()
  script.Parent:Remove()

Revision as of 11:38, 23 June 2020

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)