recently I’ve been on the dev forum look for this weird error for some reason its called userid is not a valid member of player any help :the script is
local DS = game:GetService(“DataStoreService”):GetDataStore(“SaveData”)
game.Players.PlayerAdded:Connect(function(plr)
wait()
local plrkey = “id_”…plr.userid
local save1 = plr.leaderstats.Strength
local save2 = plr.leaderstats.Cash
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
sure here it is local DS = game:GetService(“DataStoreService”):GetDataStore(“SaveData”)
game.Players.PlayerAdded:Connect(function(plr)
wait()
local plrkey = “id_”…plr.Userid
local save1 = plr.leaderstats.Strength
local save2 = plr.leaderstats.Cash
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