I have tried so many data save methods and NONE of them work for me. Hopefully you guys will be able to help.
GemsStore = game:GetService("DataStoreService"):GetDataStore("DataStore")
game.Players.PlayerAdded:connect(function(plr)
local stats = Instance.new('Folder', plr)
stats.Name = 'leaderstats'
local Gems = Instance.new('IntValue', stats)
Gems.Name = 'Gems'
Gems.Value = GemsStore:GetAsync(plr.UserId) or 0
if GemsStore:GetAsync("Points_"..plr.Name) ~= nil then
Gems.Value = GemsStore:GetAsync("Points "..plr.Name)
else
Gems.Value = 0
end
Gems.Changed:connect(function(Val)
GemsStore:SetAsync("Points "..plr.Name, Val)
end)
end)
