SaveBoolean (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>JulienDethurens
If you don't put a nil argument, it is assumed by the template.
>JulienDethurens
No edit summary
Line 1: Line 1:
<onlyinclude>{{Method
<onlyinclude>{{Method
|name                = SaveBoolean
|name                = SaveBoolean
|arguments            = [[String]] key, [[Bool]] value
|arguments            = {{type|string}} <var>key</var>, {{type|bool}} <var>value</var>
|description          = Saves a boolean value that can be reloaded from any server via [[LoadBoolean (Method)|LoadBoolean]]
|description          = Saves a {{type|boolean}} value that can be reloaded from any server via [[LoadBoolean (Method)|LoadBoolean]].
|object              = Player
|object              = Player
}}</onlyinclude>
}}</onlyinclude>

Revision as of 23:40, 12 February 2012

SaveBoolean( string key, bool value )
Returns nil
Description: Saves a boolean value that can be reloaded from any server via LoadBoolean.
Member of: Player


Example

This example will save true as the value of the key 'HasPlayed' everytime a player leaves.

game.Players.PlayerRemoving:connect(function(player) if player.DataReady then -- To make sure the data is ready. player:SaveBoolean('HasPlayed', true) -- Save the boolean. end end)