ClearContent (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>ArceusInator I keep forgetting those brackets >.> |
>Camoy No edit summary |
||
Line 1: | Line 1: | ||
<onlyinclude>{{Method | <onlyinclude>{{Method | ||
|name = ClearContent | |name = ClearContent | ||
|arguments = [[Bool]] ''resettingSimulation'' | |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. | |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. | ||
Line 7: | Line 6: | ||
|protected = Yes | |protected = Yes | ||
}}</onlyinclude> | }}</onlyinclude> | ||
{{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 ) | <pre>game:ClearContent(true) | ||
game:ClearContent( false ) -- removes everything in game.Workspace</pre> | game:ClearContent(false) -- removes everything in game.Workspace\ | ||
</pre> | |||
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>}} | |||
[[Category:Methods]] |
Revision as of 20:20, 27 December 2010
![]() | |
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) 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