LoadNumber (Method)

From Legacy Roblox Wiki
Revision as of 03:31, 27 April 2023 by Realjame (talk | contribs) (Text replacement - "<code lua>" to "<SyntaxHighlight code="lua">")
Jump to navigationJump to search
LoadNumber( string key )
Returns number
Description: Returns a number value that was previously saved to the player via SaveNumber with the same key. If the key doesn't exist, it returns 0, not nil.
Member of: Player


Example

This code would print the number saved to the "Number" key of every player that enters.

<SyntaxHighlight code="lua"> game.Players.PlayerAdded:connect(function(player) player:WaitForDataReady() print(player:LoadNumber("Number")) end)

See Also