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              = n/a
|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()
script.Parent:Remove()
end
end


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

Revision as of 02:26, 27 December 2010

Remove( )
Returns nil
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)