Remove (Function): Difference between revisions
From Goodblox Wiki
Jump to navigationJump to search
Pizzaboxer (talk | contribs) No edit summary |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{CatUp|Functions}} | |||
<onlyinclude>{{Function| | <onlyinclude>{{Function| | ||
name = Remove | name = Remove | ||
Line 9: | Line 10: | ||
==Example== | ==Example== | ||
<pre> | <pre> | ||
local function onTouched(hit) | |||
function onTouched(hit) | script.Parent:Remove() | ||
end | end | ||
Latest revision as of 20:51, 23 September 2021
Function | |
---|---|
Syntax | Remove( ) |
Returns | n/a |
Description: | Sets the Parent property to nil and calls Remove() on all children |
In Object: | Global |
Example
local function onTouched(hit) script.Parent:Remove() end script.Parent.Touched:connect(onTouched)