This is my code it never saves?
local datastore = game:GetService("DataStoreService")
local ds1 = datastore:GetDataStore("LevelSaveSystem")
local ds2 = datastore:GetDataStore("CashSaveSystem")
local ds3 = datastore:GetDataStore("RubySaveSystem")
game.Players.PlayerAdded:Connect(function(plr)
local folder = Instance.new("Folder", plr)
folder.Name = "leaderstats"
local level = Instance.new("IntValue", folder)
level.Name = "Level"
local cash = Instance.new("IntValue", folder)
cash.Name = "Cash"
local ruby = Instance.new("IntValue", folder)
ruby.Name = "Ruby's"
level.Value = ds1:GetAsync(plr.UserId) or 0
ds1:SetAsync(plr.UserId, level.Value)
cash.Value = ds1:GetAsync(plr.UserId) or 10
ds2:SetAsync(plr.UserId, cash.Value)
ruby.Value = ds1:GetAsync(plr.UserId) or 0
ds3:SetAsync(plr.UserId, ruby.Value)
end)
game.Players.PlayerRemoving:Connect(function()
ds1:SetAsync(game.player.UserId, game.player.leaderstats.level.value)
ds2:SetAsync(game.player.UserId, game.player.leaderstats.cash.value)
ds3:SetAsync(game.player.UserId, game.player.leaderstats.ruby.value)
end)

1 comment
Do you mean your leaderstats won't save?