Remove (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>JulienDethurens No edit summary |
m Text replacement - "<code lua>" to "<SyntaxHighlight code="lua">" |
||
Line 10: | Line 10: | ||
{{Example|This is an example of removing a part in the [[RBX.lua.Workspace (Object)|Workspace]]. Make sure there is one there before trying this. | {{Example|This is an example of removing a part in the [[RBX.lua.Workspace (Object)|Workspace]]. Make sure there is one there before trying this. | ||
<code lua> | <SyntaxHighlight code="lua"> | ||
Workspace.Part:Remove() | Workspace.Part:Remove() | ||
</code> | </code> |
Revision as of 03:05, 27 April 2023
Deprecated:This item is deprecated. Do not use it for new work. Use ClearAllChildren to get rid of all child objects, or Destroy to completely destroy this object and its descendants. If you have to remove an object from the game, and you must return it again later, set its Parent property to nil.
Remove( ) | |
Returns | nil |
Description: | Sets the Parent property to nil and calls Remove() on all children. |
Member of: | Instance |
Example
This is an example of removing a part in the Workspace. Make sure there is one there before trying this.
<SyntaxHighlight code="lua"> Workspace.Part:Remove()