Will PCalls fail if the data request is dropped?

If I have a pcall wrapped around my UpdateAsync function, and I call it too much causing the game to just not save the data, will my pcall fail? I have a retry system and it only works if the pcall fails.

local Attempts = 0

	repeat
		local Success = pcall(function()
			return --UpdateAsyncMegafunction that I removed, as it's unimportant
		end)

		if Success == false then
			Attempts += 1
			task.wait(10)
		end
	until Success == true or Attempts > 4
1 Like

The only error that can stop a pcall is Exception while signaling: Must be a LuaSourceContainer, but pcall will not prevent the data from being dropped. You just need to debounce your autosaves.

1 Like