Remote Event Event Dropped, even with OnServerEvent

  1. What do you want to achieve?

So in this gun script the arms move with your camera, ex: you look up and your arms point up, and it’s supposed to just send the data of the arm angles over to the server where it then changes the arm angle on the server so everyone can see.

  1. What is the issue? Include screenshots / videos if possible!

This used to work but for whatever reason it stopped working and I’m not certain why. The issue is that even though the event fires and there is a OnServerEvent it still says that it the event was dropped, the problem is probably that the event isn’t being reached for whatever reason but I’m not sure why.

  1. What solutions have you tried so far?
  • I have tried looking at other posts
  • I have added a print statement in the event and above the event to see if it reaches the event (it doesn’t)
  • Rewriting the “OnServerEvent” + Checking for spelling errors
  • Moving the OnServerEvent to the top of the script so nothing obstructs it

This image shows how everything is set up.

Server Script:

print("reached this thingy")
script.Parent.position.OnServerEvent:Connect(function(player, armdata1, armdata2)
	if tool.Enabled == true and player.Name == character then
		character.Torso["Left Shoulder"].C0 = armdata1
		character.Torso["Right Shoulder"].C0 = armdata2
	--else
		--player:Kick("Gun System: Potential Exploiter")
	end
end)

Local Script:

runservice.Heartbeat:Connect(function()
	if equiped then
		local rightX, rightY, rightZ = char.Torso["Right Shoulder"].C0:ToEulerAnglesYXZ()
		char.Torso["Right Shoulder"].C0 = (char.Torso["Right Shoulder"].C0 * CFrame.Angles(0, 0, -rightZ)) * CFrame.Angles(0, 0, math.asin((mouse.Hit.p - mouse.Origin.p).unit.y))

		local leftX, leftY, leftZ = char.Torso["Left Shoulder"].C0:ToEulerAnglesYXZ()
		char.Torso["Left Shoulder"].C0 = (char.Torso["Left Shoulder"].C0 * CFrame.Angles(0, 0, -leftZ)) * CFrame.Angles(0, 0, math.asin((-mouse.Hit.p - -mouse.Origin.p).unit.y))
		script.Parent.position:FireServer((char.Torso["Left Shoulder"].C0 * CFrame.Angles(0, 0, -leftZ)) * CFrame.Angles(0, 0, math.asin((-mouse.Hit.p - -mouse.Origin.p).unit.y)), (char.Torso["Right Shoulder"].C0 * CFrame.Angles(0, 0, -rightZ)) * CFrame.Angles(0, 0, math.asin((mouse.Hit.p - mouse.Origin.p).unit.y)))
	end
end)

Error: Remote event invocation queue exhausted for Workspace.Asmetics.AK-47.position; did you forget to implement OnServerEvent? (x events dropped)

are you sure it successfully connects the onserver, since you’re directly going to the remote and not waiting there might be a possibility it doesn’t find the remote because its not loaded

Trying to connect an event before the remote is accessible would cause an error on the server side, as that would essentially be trying to access the property OnServerEvent of nil. I reckon this is caused by the fact that OP is firing the event every heartbeat, possibly exceeding the remote event’s limit.

A related solution is in the thread Error Message: "remote function invocation queue exhausted"

Yeah the problem was that I was way over the rate limit, thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.