local ds = game:GetService("DataStoreService") local cs = ds:GetDataStore("Cash") game.Players.PlayerAdded:Connect(function(plr) local Cash = plr:WaitForChild("leaderstats"):WaitForChild("Cash") local data local succ, err = pcall(function() data = cs:GetAsync(plr.UserId.."_cash", Cash) if succ then Cash = data print("a") end end) end) game.Players.PlayerRemoving:Connect(function(plr) local data = plr.leaderstats.Cash.Value local succ, err = pcall(function() cs:SetAsync(plr.UserId.."_cash", data) if succ then print("it worked") else warn(err) end end) end)
please help! it says
nil
when i leave which means nothing or there was an error
Please use nice words and not ''Guys'' I personally can't stand this. Try to put value behind Cash.
Cash.Value = 0
I see you did this at line 19, try to do this at line 5, 9 and 12 too.
Reply if it doesn't work!