Insight on ("Player" seems to be spamming remote events.)

Hello everyone! Today I wanted to address something that I have had to deal with for a while, and I’m sure PLENTY of other developers have stumbled across, and possibly quit games over, or at least lost motivation for a while over.

As you can see in this image, I have all of these warnings that read:
Player “Player Name” appears to be spamming RemoteEvents.

Now you are probably thinking, “Well just stop spamming RemoteEvents? Can’t be that difficult right?”, but the point is that I’m really only firing one or two RemoteEvents a second in this scenario, which is an obvious way to say that I’m not spamming RemoteEvents.

There isn’t a lot of information on Roblox’s “RemoteEvent Rate Limiter”, so it’s very difficult to diagnose this problem, especially because the warning itself doesn’t even tell you, and this doesn’t happen in studio.

Sorry if these videos are a bit long, and I put them on YouTube, but please watch them.

In clip 1, you can see that my ping skyrockets for no known reason, and the attached screenshot at the top of this post is the response I received in console.
In clip 2, you can see the ping is fine, and the game is running relatively normally, minus some small changes…

The only difference in the clip is one has animations for walking and one doesn’t. So I tried this multiple times to ensure I was 100% correct, and yes, it is the animations.

It seems that Roblox sends the animations from the client to the server to be replicated across clients, which increases the “Sent” in performance monitor by a lot, which is also seen in clip 1. This means that whatever is being sent to the server is being recognized as a RemoteEvent, and it’s throttling everything else I’m trying to send to the server.

This means that MY issue at least has NOTHING to do with the RemoteEvents that I am firing in my code, and only has to do with Roblox animation replication. I’m currently optimizing my animation system on the client, and I’ll post an update after.

In conclusion, it’s a decent chance that it has nothing to do with your RemoteEvents if you are confident that you aren’t firing RemoteEvents like crazy. My best advice is to check your client-played animations, try disabling them to see if it fixes the throttling, and possibly try other methods that may be used to send client data to the server that ISN’T through RemoteEvents.

I hope this post helped you, and I apologize if it’s not the greatest organized, or there’s a lot of rambling since this is my first post. I wish you guys luck on your development journeys on Roblox!

Edit:
After some more experimenting, I found that it was mainly Animation:AdjustSpeed() and Animation:AdjustWeight() that was causing the spikes, which Roblox assumed was me spamming RemoteEvents. I’m sure Animation:Play() has some sort of impact, but for the most part those 2 functions seemed to cause throttling, especially when binded to RenderStepped.

6 Likes

Thanks, I’ve been having this issue for a while now, and considered quitting development on my game, you saved me.

but sending remotes to play animations on other clients shouldn’t consume that much bandwidth if the animation does exist on the clients that is why default walking/running/jumping animations don’t spam remote events (i may be wrong)

also, the Sent increased a lot in the 1st video but the player didn’t attack over 2 times per second to increase it that much

I may have missed something but both videos have animations

1 Like

Sorry if I didn’t clarify properly, specifically the walking animations were the ones causing the lag.
The reason why that I found, which I experimented with and am 100% sure is the problem, is because I update the speed of the animations to match your current velocity every render step. When I turned that off, my KB/s sent to the server dropped significantly, and it no longer says I am spamming remote events.
I am sure this entire topic seems confusing, but it’s simply just what’s been happening. I will say though, it’s mostly AdjustSpeed() and AdjustWeight() that seems to be causing the issue.

Also keep in mind, it’s not the CPU usage that goes up as it does in the video you referenced, and the animations played in my case are on the client, hence why it is affecting client ping.

1 Like