local dataStore = game:GetService("DataStoreService"):GetDataStore("SaveData") game.Players.PlayerAdded:Connect(function(plr) wait() local plrid = "id_"..plr.UserId local save1 = plr.leaderstats.Wins
local GetSaved = dataStore:GetAsync(plrid) if GetSaved then save1.Value = GetSaved[1] else local NuberForSaving = {save1.Value} dataStore:GetAsync(plrid, NuberForSaving) end
end)
game.Players.PlayerRemoving:Connect(function(plr) dataStore:SetAsync("id_"..plr.UserId{plr.leaderstats.Wins.Value}) end)
why does this only work in studio
I do not know if it is on the leaderstats script, datastore script or the wins on touch part script.