ClearContent (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>NXTBoy
Removing links - should be part of template
>ArceusInator
Added examples and listed the "resttingSimulation" argument
Line 1: Line 1:
<onlyinclude>{{Method
<onlyinclude>{{Method
|name                = ClearContent
|name                = ClearContent
|arguments            =
|returns              = [[nil]]
|description          = Clears all objects, and returns DataModel to its default form.
|arguments            = [[Bool]] ''resettingSimulation''
|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.
|object              = DataModel
|object              = DataModel
|protected            = Yes
|protected            = Yes
}}</onlyinclude>
}}</onlyinclude>
[[Category:Methods]]
[[Category:Methods]]
{{Example|
If you're using the [[Command Bar]] or a [[CoreScript]]...
<pre>game:ClearContent( true ) -- removes everything in the game
game:ClearContent( false ) -- removes everything in game.Workspace</pre>
If you're using a [[Script]] or a [[LocalScript]]...
<pre>game:ClearContent( true ) --> s ClearContent
game:ClearContent( false ) --> s ClearContent </pre>

Revision as of 19:56, 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