Really high ping in my game

Hello all, I have already posted this but the help I got was not successful,

I am aware that there has been other posts about this but none seemed to fix the issues I’m having. Also I’m not sure if this is the correct category, but here goes:

Over the past couple of weeks I’ve been working on my new game ‘Amusement Island’. It consists of a lot of funfair style rides all in one place for users to enjoy with their friends.

I added about 5 new rides recently, and when I went to test the world, the ping was super high (around 300ms constant). I don’t know what has caused the issue, and whether it’s anything to do with my end at all. I know it’s not my internet as I am connected to our router via ethernet and I get around 20ms ping to London.

I have disabled 50+ scripts because I thought this may be the cause of the issue. No luck. I had a ‘Club’ style building with flashing lights and things like that, and I moved that away thousands of blocks, but again, that did not reduce the ping. I have sent a message to Roblox, but they haven’t got back to me yet and I thought there may be some people here with similar issues/had similar issues that they have resolved. I have tried moving everything off the map to another blank world to see if that would make it any better, but no again.

I was hoping to release the game this weekend but when this issue occurred mid last week it’s put it on hold, and I am trying to get it out as soon as possible. Obviously there is no rush, as I want this to be as good as possible. To me, I don’t think there’s anything wrong with the rides as I had them all on a separate world and I copy them directly from that world into the new one. They all worked and still work perfectly over there on the test world.

These are the only differences:
GUI
A map (Like better terrain but only built out of parts)
A spawn building
The club
And a randomised music script

All of these features have been in since the start, so I don’t believe it’s anything to do with these. As I’ve already said, I’m getting anywhere from 200-1000ms ping all the time, and it makes the rides impossible to use and ride well.

Many thanks for any help you all can give,
PCHDB :slight_smile:

When dealing with these really core engine issues, it helps to break down the exact processes the engine goes through.

For ping, this is the time it takes to send a message from your computer to the server, and then back. Things that can interfere with this ping is sending a lot of client to server data and vice versa. If your rides are handled on the client, this can increase ping, for example. Take a look at what kinds of things you’re communicating (primarily client to server) and look for potential things that may hog up the traffic.

What kind of things would be going from client to server, would this be things like local scripts? Most of the scripts making the rides run are normal as we want it to happen globally. I did not write or create the rides, and currently am not very familiar with scripting, so i’m not able to identify the problem outside of things i’ve already tried.
I’ll have to get back to you tomorrow now, but i’ll be able to talk to you more in detail and you can ask questions then.
Any help is greatly appreciated, many thanks!

If you didn’t write or create any of the code in your game, then there’s the issue. If you use code you haven’t written, then expect issues or bugs. Unless you’re having someone write the code for you, like a contractor.

I did create and edit code in things such as the GUI and the music scripts, but I haven’t written or designed any of the rides and there scripts. As I said, I’ve tested every single ride on another world, which had more rides on at the same time, and they all ran perfectly well.
Feel free to reply whenever, but I’ll get back to you in the morning, when I’ll be able to help with specific details and what to do to try and fix it.

My biggest suspect is the rides. Look out for any local scripts and tell me what you see.

I’ve looked through all the rides, and no local scripts can be found. However, I do have a lot of local scripts doing things in GUIs. I feel like I could be able to execute a lot of these inside one script but I have tried it and it seemed to stop the buttons from working entirely. As I’ve said, there are no local scripts in the rides.

This is highly likely to be due to remote functions/events in your scripts being fired constantly and with a lot of data. This is likely to overload your network connection between the server and the client so the client will have to take priorities for what data to process.

If this is the case, then the only way to prevent this from happening is to find out what script is constantly firing remotes and work around that. A method, depending on how important it is to constantly send data would be to add a cooldown between each remote fire, though, this in most cases should be unnecessary.

Edit: what I said about the client having to take priorities, still apply if the remote fires weren’t the problem here. If it’s not the remote events then it’s still because the client receives a lot of data at once and has to take priorities. Another possible reason for why this happens can be that the rides are being handled server side, which should definitely be done client side.

Moving the lights away is irrelevant to your ping. The lights would still replicate. This is only if the lights are coded server-side though, then you would have to disable the entire script for any possible change regarding your ping.

I believe i have solved the issue. I think it was due to the map I seemed to be using, or another issue. I had my test world with every ride on and that’s always run fine so I’ve decided to make a map out of terrain instead of bricks on this world. It seems to be much better, whether there was something broken in the original world I don’t know, but this way appears to work. If it gets a high ping on the new map again, I will return to this post or make a new one regarding it. Many thanks for all your help so far, I’ll be back in contact if the issue arouses again :slight_smile:

Non-moving objects does not affect ping except for when you load in for the first time.

Well I don’t know what it is then, but whatever has changed between these two worlds has seemed to fix it. The rides run smooth and well, i’m averaging around 80ms, probably due to what you’ve mentioned but it’s not laggy, and i dont feel there’s any need to change things if its working now? I will change things if it occurs again?