I'd like to answer this question because a lot of people keep asking me about it, here are the reasons
1: It must be a server sided script, not a local script, local scripts save locally and do not update to the server.
2: This script must be placed within serverscriptservice or workspace.
3: The player data must save under the player's ID, and not their username.
4: It must load the data when the player enters the game, and save it when the player leaves the game. Here is an example.
local function onPlayerJoin(player) -- Runs when players join
--blah blah make your stats and save it under a folder
local playerUserId = "Player_" .. player.UserId --Gets player ID
local data = playerData:GetAsync(playerUserId) --Checks if player has stored data
if data then
-- blah blah tell it what to do
local function onPlayerExit(player) --Runs when players exit
local success, err = pcall(function()
local playerUserId = "Player_" .. player.UserId
playerData:SetAsync(playerUserId, player_stats) --Saves player data
end)
-- blah blah and end, of course I did miss some steps, this is just a rough example.
By the way some people tell me that their values are not next to their name, if the file is not named leaderstats, then it will be saved as a unseen values.
Unseen values are still savable, and still can be accessed the same way.
I hope this helped some people that have this problem!
