Heres Error: GetAysnc is not a valid member of GlobalDataStore
local ds = game:GetService("DataStoreService"):GetDataStore("SaveData")
game.Players.PlayerAdded:Connect(function(plr)
wait()
local plrkey = "id_"..plr.userId
local save1 = plr.leaderstats.Fish
local save2 = plr.leadersats.Pearls
local GetSaved = ds:GetAsync(plrkey)
if GetSaved then
save1.Value = GetSaved[1]
save2.Value = GetSaved[2]
else
local NumberForSaving = {save1.Value, save2.value}
ds:GetAsync(plrkey, NumberForSaving)
end
end)
game.Players.PlayerRemoving:Connect(function(plr)
ds:GetAysnc("id_"..plr.userId, {plr.leaderstats.Pearls.Value, plr.leaderstats.Fish.Value})
end)
Hope You Can Help!

3 comments
This isnt working
did you try leaving, then rejoining?
yes i did