please help me to solve problem
local dataStore = game:GetService("DataStoreService"):GetDataStore("SaveClicks")
game.Players.PlayerAdded:Connect(function(plr)
wait()
local plrid = "id_" .. plr.UserId
local save1 = plr.leaderstats.Clicks
local GetSave = dataStore:GetAsync(plrid)
if GetSave then
save1.Value = GetSave[1]
else
local NumberForSaving = {save1.Value}
dataStore:GetAsync(plrid, NumberForSaving)
end
end)
game.Players.PlayerRemoving:Connect(function(plr)
dataStore:GetAsync("id_" .. plr.UserId, {plr.leaderstats.Clicks.Value})
end)