bascially i made currency system and when i check to see if it saves by changing the amount of cash i have then going off the game and back on it wont save the currency. here is the script
local datastore = game:GetService("DataStoreService") local ds1 = datastore:GetDataStore("GemSaveSystem") local ds2 = datastore:GetDataStore("CashSaveSystem")
game.Players.PlayerAdded:connect(function(plr) local folder = Instance.new("Folder", plr) folder.Name = "leaderstats" local cash = Instance.new("IntValue", folder) cash.Name = "Coins"
cash.Value = ds2:GetAsync(plr.UserId) or 0 ds2:SetAsync(plr.UserId, cash.Value)
cash.Changed:connect(function() ds2:SetAsync(plr.UserId, cash.Value)
end) end)

1 comment
Don't repost the exact same question multiple times, especially within less than 1 hour...