When a player leaves, this function is called
local function saveData(player)
local playerUserId = player.UserId
local success = pcall(function()
playerData:UpdateAsync(playerUserId, function(oldData)
return sessionData[playerUserId]
end)
end)
end
I’m wondering what would happen if the pcall would result into an error once a player leaves the game. Would it call UpdateAsync over and over again to try and get saved value back? (Note: I’m really new to datastores so apologies for the lack of understanding/knowledge about them)