Remove (Function): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Mr Doom Bringer
m Remove moved to Remove (Function)
>Mr Doom Bringer
No edit summary
Line 9: Line 9:


==Example==
==Example==
<pre>
{{CodeExample}}


function onTouched(hit)
function onTouched(hit)
script.Parent:Remove()
:script.Parent:Remove()
end
end


script.Parent.Touched:connect(onTouched)
script.Parent.Touched:connect(onTouched)
</pre>
|}

Revision as of 21:39, 9 March 2010

Remove( )
Returns n/a
Description: Sets the Parent property to nil and calls Remove() on all children


Example

Template:CodeExample

function onTouched(hit)

script.Parent:Remove()

end

script.Parent.Touched:connect(onTouched) |}