I’ve seen many posts like this, but none of them had the solution to my problem.
I have a save system where it stores strings and numbers triggered by an bindable event from clicking a GUI button. The save function is called from a module script.
This warning comes up whenever the event is fired, though
From what I read, this comes up if there are too many requests queued at once. I’m not sure how I got this error because the event only fires once.
Here’s my code:
Part of Save Module script
local function savePlayerData(playerUserId)
if sessionData[playerUserId] then
PreferenceData:SetAsync(playerUserId, sessionData[playerUserId])
end
end
function PlayerPreferences:SaveData(player)
local playerUserId = "Player_" .. player.UserId
savePlayerData(playerUserId)
end
Script that calls module script, triggered by remote event
changeEvent.OnServerEvent:Connect(function (player, newChar)
saveModule:ChangePreference(player, "Character", newChar) --sets up new changes to data
saveModule:SaveData(player) ---------------The issue----------------
end)