ClearContent (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>ArceusInator
Added examples and listed the "resttingSimulation" argument
>ArceusInator
I keep forgetting those brackets >.>
Line 29: Line 29:
If you're using a [[Script]] or a [[LocalScript]]...
If you're using a [[Script]] or a [[LocalScript]]...
<pre>game:ClearContent( true ) --> s ClearContent
<pre>game:ClearContent( true ) --> s ClearContent
game:ClearContent( false ) --> s ClearContent </pre>
game:ClearContent( false ) --> s ClearContent </pre>}}

Revision as of 19:57, 27 December 2010

ClearContent( Bool resettingSimulation )
Returns nil
Description: If resttingSimulation is false, it removes everything in the Workspace. If resttingSimulation is true, it removes everything in the game--this includes CoreGui, Players, and Workspace.
Member of: DataModel








Example

If you're using the Command Bar or a CoreScript...

game:ClearContent( true ) -- removes everything in the game
game:ClearContent( false ) -- removes everything in game.Workspace

If you're using a Script or a LocalScript...

game:ClearContent( true ) --> s ClearContent
game:ClearContent( false ) --> s ClearContent