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)
Should work now. You had SetAsync and GetAsync with different names liek 'points_name' or 'points name' etc. Make sure in your configuration in your place you should have Save API enabled.
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("Points_"..plr.Name) 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)