ClearContent (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>ArceusInator
I keep forgetting those brackets >.>
>JulienDethurens
Undo revision 56943 by SoulStealer9875 (talk) Make a redirect instead; it's not a broken link.
 
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{locked}}
<onlyinclude>{{Method
<onlyinclude>{{Method
|name                = ClearContent
|name                = ClearContent
|returns              = [[nil]]
|arguments            = [[bool]] <var>resettingSimulation</var>
|arguments            = [[Bool]] ''resettingSimulation''
|description          = If <var>resettingSimulation</var> is {{false}}, it removes everything in the Workspace. If <var>resettingSimulation</var> is {{true}}, it removes everything in the game; this includes CoreGui, Players, and Workspace.
|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]]


{{clear floats}}


{{Example|
{{Example|
If you're using the [[Command Bar]] or a [[CoreScript]]...
If you're using the [[command bar]] or a [[CoreScript]]...
<pre>game:ClearContent( true ) -- removes everything in the game
{{code|=game:ClearContent(true)
game:ClearContent( false ) -- removes everything in game.Workspace</pre>
game:ClearContent(false) -- removes everything in game.Workspace\
}}
If you're using a [[Script]] or a [[LocalScript]]...
If you're using a [[Script]] or a [[LocalScript]]...
<pre>game:ClearContent( true ) --> s ClearContent
{{code|=game:ClearContent(true) --> s ClearContent
game:ClearContent( false ) --> s ClearContent </pre>}}
game:ClearContent(false) --> s ClearContent
}}}}
 
[[Category:Methods]]

Latest revision as of 18:58, 22 April 2012

Protected:This item is protected. Attempting to use it in a Script or LocalScript will cause an error.
ClearContent( bool resettingSimulation )
Returns nil
Description: If resettingSimulation is false, it removes everything in the Workspace. If resettingSimulation 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)
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