Ping is really high

So I was making an obby game and I finished with the main menu. But when I saved and played the game on mobile, my ping was increasing to high amounts like 300ms or 1000ms. I don’t know what’s causing this. This is the game I made.


And this is the screenshot.

I had to use camera roll because I can’t log in on my iPad.
What it said in “Ping” was 823.33ms. I accidentally chose memory.

No one can figure out from just the images alone.
It’s like me showing you I have 1 fps, and then asking you why is my computer lagging? How would you know?

You need to give more information, more context.

Try disabling/removing some scripts to see if it affects the ping. Look for mobile-only parts of scripts? How are you sure your mobile device isn’t the one having high ping? Did you try running on a different mobile device? Tell us what you tried and figured out.

2 Likes

Unless this doesn’t happen with other games, this is just an internet issue and fixing it does not involve changing your game

Is it the ping that is high or the memory? By the looks of it, it’s most definitely the memory.

Here’s a post on this issue:

Please view it.

1 Like

You’re game is very unoptimized something is firing a ton of remote events / other things. I would suggest opting for unreliable remote events. There could be more underlying issues here such as memory leaks you aren’t cleaning up connections or making multiple connections stack.

  • Run through any code that may have :Connect() in it
  • Check where Remote Events are being fired and how much they are being fired
  • Clean up any variables you don’t need anymore local testVar = nil or tables too.

Doing those things can lower down your memory, some other people may have to chime in with other things they encountered that causes memory leaks / network traffic. An obby game should not have this much usage but rather an Anime Battlegrounds Type Of Game would.

If you would like you can put the game to public and post the link here this way you can see if it’s a device issue or an internet issue as well… Some people may be able to use MicroProfiler to analyze what’s going on.

You can also view the post @iicloudsforeveriii has linked above, as it was a recent topic that was solved.

1 Like

45ms is the result in Studio. Not in game.

It looks like on mobile / other screenshot is says 653ms :sob: . Sorry! But as for the other guy the user is in Roblox Player and not Studio. So this is Roblox Player footage which still exceeds the limit you should have on Memory usage.

So it’s happening on pc too.

So, I’m not really sure what’s causing it but it’s probably these scripts because on a client, you can only fire the event to the server. So I think these scripts are what causing the issue. Same for remote events because the same was happening on PC.

I don’t know which one to remove :sob:

You have to go through the local scripts manually and see which one’s could be giving you your memory issue. I have no idea what LuauHeap does but check that since it will help you determine which script / whatever is raising memory. It’s most likely a Memory Leak rather than remote events. Remote Events only spike Ping and Network Usage

That explains a lot.

From the looks of it, it looked like you misspelled ping as memory. My mistake.

The same methods for reducing memory usage can apply to ping as if you load and unload a lot of things, the receiving and sending data sizes can become quite large causing high ping. I suggest reducing events and checking up on remote events.

Yeah, I noticed. My fault. I should’ve read more carefully.

1 Like

Maybe I know the issue. I just need to know how to find memory leaks.

Edit: uh oh


Another edit: yeah how can i fix this

Is that image taken inside of studio or the Roblox player?

The image is taken inside of studio. I think there’s a memory leak somewhere

Yep 100% a memory leak. It look’s like Heartbeat by RunService is the main issue try and find every LocalScript that uses RunService.Heartbeat:Connect(function() and send the code here so we can help clean this up! :slight_smile:

Edit: What happens if you press the drop down arrow on the Heartbeat in the menu?

image

This is what happens.

That could be your issue right there. Sorry for the late response but you shouldn’t make the KillBrick spin under heartbeat try opting for something like TweenService it’s still bad performant wise but I believe it is a better solution than to make it spin on the client through heartbeat.

Also thinking about it now. I think you can apply a velocity to it and just have it spin that way? You may have to search up a youtube video for that. But i believe games like Tower Of Hell use it because its so much more performant and doesn’t use any scripts.

But how am I gonna implement velocity into the game?

Just skimmed through this video this may work, except I would just load it through a main server script instead of each part having its own script. a simple for loop would suffice.

1 Like