Tips to optimising scripts

My game gets an average of 400-500 pings

My game is a pretty large map, I estimate the size of the terrain would be about 10k x 10k studs. As the game is a military roleplaying game, there’s helicopters, tanks, vehicles basically a lot of scripts. The game doesn’t have any FPS drop and it runs pretty smoothly with a low-end PC.

The only problem I’m encountering is that the game gets an average of 400-500 pings as shown with the picture below

So I’m assuming it’s the problem with my scripts, could I get some tips on how I can optimise my scripts and reduce pings in my game?

1 Like

Since you have a giant terrain that takes time to load, you can use this new feature that just came out.

Game Content Streaming allows the Roblox engine to dynamically load and unload assets in regions of the world. This can improve the overall game experience in several ways.

You can see here the types of Game Content Streaming.

You can try to reduce lags by checking other unnecessary scripts, or you can reduce the map size by a bit. But, I recommend the solution, I mentioned above.

1 Like

By just came out he wants to mean months/years ago

lower the server size? maybe that helps?

Oh I never knew this existed, I’ll try it.

Most part of the terrain are being used so I really can’t reduce the size.

the max players in a server that is the server size

Oh you meant that. My game is heavily dependant on interactions with other people, so reducing the serversize would ruin the point of the game.

Try reusing MeshId/TextureIds as much as you can.

Let’s say you have like 30 different MeshIds for tree leaves, try and just use one and copy and paste it. To make them appear different try changing size/color/etc.

Also show us Script Performance during a live game so we can see what’s taking up a lot.