So I have a script that calls remote events but one remote event isn’t working here’s my script for help.
Events.ClientService.OnServerEvent:Connect(function(Player, Mode) -- Mode is to secure the event)
if Mode == "Exploiter" then -- For tools (because tools aren't droppable I check if they are to kick them if CanBeDropped is set to true.)
Player:Kick("Potentially Exploiting.")
------
elseif Mode == "Dead" then
Player.Character:WaitForChild("Head"):WaitForChild("PlayerHead").Frame.Deceased.Visible = true -- Shows the player is dead - called on a local script.
elseif Mode == "Alive" then
Player.Character:WaitForChild("Head"):WaitForChild("PlayerHead").Frame.Deceased.Visible = false -- Shows the player is alive (doesn't show any sign at all.) - called on a local script.
------
elseif Mode == "OtherNotDone" then
end
end)
In the output, there is an error that I’ve never seen so I can’t really understand it. Output:
00:27:17.112 - Remote event invocation queue exhausted for
ReplicatedStorage.Events.ClientService; did you
forget to implement OnServerEvent? (512 events
dropped)
As I said I don’t understand much of it so I can’t say much more.
Oh, also this started when I compiled all my scripts into one big “game.Players.PlayerAdded section” – Except the events… obviously
EDIT: it says 512 events dropped but for some reason, it loops the event drops so at first, it said “1 events dropped” and then went up from there.
Remote queue exhausted means that you’re sending remotes too fast, so Roblox has to throttle those requests. Can we see where you’re sending the remote? Looking at your receiving code, this doesn’t look like anything that should be called too often.
Can we see the LocalScript calling the remote event? The problem is likely originating from there, as a script has to call a remote event to produce that error.
Don’t use a while loop for that, use a listener on Player.Character.Humanoid.
I think the problem is when you die, it just keeps calling the remote event since the player is still dead. Just check it once, disconnect the listener, and reconnect it when the player respawns.
From the looks of it, I’d agree with @bryancololee but we can only see a small part of your code and
are left to speculate what comes after the if block in the gyazo post. I’m guessing that you end
the while loop after that if block, and by that guess, I’d say add a break at the end.
If that doesn’t work, please show us more of the code.