This item is deprecated, as it may have been used for a now obsolete data persistence method. Please save and load player data using
DataStoreService for new work.
This function was once used by an ancient data persistence method to save a number value that can be loaded again at a later time using
The below example would save a number to the player with a key of “TotalPlays” and add one to the value each time.
game.Players.PlayerAdded:Connect(function(Player) if Player:WaitForDataReady() then local OldValue = Player:SaveNumber("TotalPlays") Player:SaveNumber("TotalPlays", OldValue+1) end end)