I've recently created a Data saving script for playerdata in my game. The system looks like this:
local function SaveData(player) if player.userId < 0 then return end player:WaitForChild("leaderstats") wait() local leaderstats = {} for i, stat in pairs(player.leaderstats:GetChildren()) do table.insert(leaderstats, {stat.Name, stat.Value}) end leaderboardData:SetAsync(player.userId, leaderstats) Print("Saved "..player.Name.."'s data") end local function LoadData(player) if player.userId < 0 then return end player:WaitForChild("leaderstats") wait() local leaderboardStats = leaderboardData:GetAsync(player.userId) for i, stat in pairs(leaderboardStats) do local currentStat = player.leaderstats:FindFirstChild(stat[1]) if not currentStat then return end currentStat.Value = stat[2] end Print("Loaded "..player.Name.."'s data") end
Now it works perfectly, but I have found that I cannot view the data it has saved.
By this I mean the data loads and you can see it in-game, but I cannot see what the datastore service holds for each player in the studio. If I saw a player and wanted to change one of their statistics, I don't know where I would go to do that. Does anyone know where I can see the datastore service's contents?
this will be appreciated
First of all, please codeblock your code using the blue Lua button then put your code within the squiggly lines.
Here are some other methods you could do to view and edit player data, although they are more advance.
Create your own website and save data on it, this way you have the ultimate control on all data saved and can view it, of course half of this requires different coding languages than lua.
A second method is using google spreadsheets (I believe this website) which is a little more easier because you should only need Lua and the http service.