Remove (Function): Difference between revisions
From Goodblox Wiki
Jump to navigationJump to search
mNo edit summary |
m (→Example) |
||
| Line 11: | Line 11: | ||
==Example== | ==Example== | ||
<pre> | <pre> | ||
function onTouched(hit) | local function onTouched(hit) | ||
script.Parent:Remove() | script.Parent:Remove() | ||
end | end | ||
Revision as of 02:47, 22 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)