It was working fine yesterday and days before then, I just tested it today and now it doesn't save anything. It also gives off no errors in the output.
local DataStore = game:GetService("DataStoreService")
local ds = DataStore:GetDataStore("LeaderboardSaveSystem")
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
local key = tostring(player.UserId)
local data = ds:GetAsync(key)
local leader = Instance.new("Folder")
leader.Name = "leaderstats"
leader.Parent = player
local Speed = Instance.new("NumberValue", leader)
Speed.Name = "Speed"
local Rebirth = Instance.new("NumberValue", leader)
Rebirth.Name = "Rebirth"
local GemVal = Instance.new("NumberValue", player)
GemVal.Name = "GemVal"
local Purchase1 = Instance.new("BoolValue", player)
Purchase1.Name = "RedTrail"
local success, msg = pcall(function()
if data then
Speed.Value = data[1]
Rebirth.Value = data[2]
GemVal.Value = data[3]
Purchase1.Value = data[4]
else
Speed.Value = 0
Rebirth.Value = 0
GemVal.Value = 0
Purchase1.Value = false
end
end)
end)
Players.PlayerRemoving:Connect(function(player)
local data = {
player.leaderstats.Speed.Value,
player.leaderstats.Rebirth.Value,
player.GemVal.Value,
player.Purchase1.Value
}
local key = tostring(player.UserId)
print("player left:", player)
ds:SetAsync(key, data)
end)

7 comments
Going to mention that it does still provide the previous data that players had before it stopped saving.
pretty sure it's a problem at roblox.
I thought they fixed that earlier this morning?
If it worked before, then just wait for roblox to make a fix if they haven't done so already
Alright, I thought I was the only one w/ this issue after the previous "fix".
Parent argument to Instance.new is deprecated.
what/how else am I supposed to be using it?