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.
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.
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.
It looks like on mobile / other screenshot is says 653ms . 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, 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.
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
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.
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!
Edit: What happens if you press the drop down arrow on the Heartbeat in the menu?
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.
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.