Error Message: Remote event invocation queue exhausted

Hello everybody,

I’m getting this really frustrating error messages in my game and I can’t seem to find a reason or a solution to it.

This is the code where the error is coming from:

game:GetService("ReplicatedStorage").Remotes.Visual.ShadowClone.OnServerEvent:Connect(function(player)
	local character = player.Character
	local headc = character.Head
	local torsoc = character.Torso
	local rightarmc = character["Right Arm"]
	local leftarmc = character["Left Arm"]
	local rightlegc = character["Right Leg"]
	local leftlegc = character["Left Leg"]
	local meclone = game:GetService("ReplicatedStorage").Main.Abilities.Broly.BrolyBox["ShadowJutsu"]:Clone()
	meclone.Head.Color = headc.Color
	meclone.Torso.Color = torsoc.Color
	meclone["Right Arm"].Color = rightarmc.Color
	meclone["Left Arm"].Color = leftarmc.Color
	meclone["Right Leg"].Color = rightlegc.Color
	meclone["Left Leg"].Color = leftlegc.Color
	meclone.Parent = workspace.FXFolder
	meclone.Name = "Brocolli Clone"
	--positioning

	for _,par in ipairs(meclone:GetDescendants()) do
		if par:IsA("BasePart") and player.Character:FindFirstChild(par.Name) then
			par.CFrame = player.Character:FindFirstChild(par.Name).CFrame
			par.CollisionGroupId = 1
			delay(.025, function()
				local ts = game:GetService("TweenService")
				ts:Create(par, TweenInfo.new(1), {Transparency = 1, Color = Color3.fromRGB(0, 255, 0)}):Play()
			end)
		elseif par.Name == "Handle" then
			local ts = game:GetService("TweenService")
			par.CollisionGroupId = 1
			ts:Create(par, TweenInfo.new(1), {Transparency = 1}):Play()
		end
	end
	delay(.15, function()
		game:GetService("Debris"):AddItem(meclone, 1)						
	end)
end)

Any kind of help would be appreciated.

How many times are you firing the event, 64 times seems like a lot of network traffic.

Your script may be spamming the RemoteEvent by keeping on firing it.

You also have to set up a listener for the RemoteEvent on the Server and Client.

Yeah about that…

mmmmmmmmm

I honestly couldn’t find another way to make this work.
The ShadowEvent is the remote where the error is coming from

I think it’s because you did repeat.

What is this ability supposed to do? There’s probably a more efficient way.

Your until is inside the repeat, so there may be an indentation error.

The loop might be running before .OnServerEvent is connected

Alright so let me explain,

This code above is from a function that activates whenever a player holds “R”. It’s a barrage move and the shadowevent thing is just an effect.

Nevermind this is really hard to explain, I’ll just show it with a gif.

This is how the move looks:

https://gyazo.com/da533cf0b92a9949926bc03fdb6a5153

And this is how I want the move to look like:

https://gyazo.com/d2e4ff5582f08bb086051f929a6c316a

Are there any wait()s above

?
The :Connect might be running after the event gets fired.

Try putting a print() above the :Connect and check if anything appears in the output.

Yeah it appeared in the output

1 Like

I’ve just noticed, the error shows the remote event is in a folder called “Broly” under Abilities in the Main folder, and not “Visual” under Remotes, you might want to check that.

That’s really strange, in the script the remote is under visuals…

The server script might be accessing the wrong remote, try changing it to the one in the error.

2 Likes

Oh my god you’re a lifesaver, tysm.