Remove (Function): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Mr Doom Bringer No edit summary |
>ArceusInator There's a box at the end and I don't know how to get rid of it. Help appreciated. |
||
Line 5: | Line 5: | ||
name = Remove | name = Remove | ||
|arguments = | |arguments = | ||
|returns = | |returns = [[nil]] | ||
|description = Sets the Parent property to [[nil]] and calls Remove() on all children | |description = Sets the Parent property to [[nil]] and calls Remove() on all children | ||
|object = Global | |object = Global | ||
|}} | |}} | ||
</onlyinclude> | </onlyinclude> | ||
Line 16: | Line 26: | ||
function onTouched(hit) | function onTouched(hit) | ||
script.Parent:Remove() | |||
end | end | ||
script.Parent.Touched:connect(onTouched) | script.Parent.Touched:connect(onTouched) | ||
|} | |} |