How to reduce lag on a game?

Lag can be caused by lots of things in games and the problem you are having may not be a problem with your PC. Before I start, I have a quick question. Are we able to see a screenshot of your game or could we have a link to your game if that is possible. This will make helping you out a lot easier as people will be able to find specific ways your game can be optimised to reduce lag.

Lag isn’t just caused by how many parts are in a game but it can be caused by scripting, terrain and the way things are built. Here is a little list of things that could be causing lag in your game:

  • Your games code may not be optimised in the best way. For example, try and avoid using infinite loops as they could cause huge amounts of lag. When moving parts use tweenservice instead of a loop as tweenservice causes a great deal less lag than what a loop would. I am not going to say anymore ways to optimise you code as I could go on forever as there is so many ways to optimise code for performance. I would suggests you search through the dev forum for more ways.

  • Do you have lots of unions/meshes. A union could increase the amount of lag in your game instead of reducing it as unions increase the poly count. I would try and reduce the amount of unions you have, if you have any. As said in another post, make sure your meshes don’t have a huge poly count. In blender you can control the tris count(poly count) of your meshes easily.

  • Do you have lots of parts in your game? The more parts you have the more your game will lag. However their is a technique to reduce the part count without changing the way the model/game looks. Here is an very small scale example, I have put outlines on the parts so you can see each separate part better:


    In this image above you can see that 9 parts make this window up. This part count could be improved. Here is what the window looks like with a few less parts:

    If you notice, this window looks exactly the same as the one above but this one has 6 parts instead of 9. All I have done is only use one part for the glass instead of two, two part for the top and the bottom.

  • Do you have any free models in your game? Free models could increase lag in your game as they could be hiding weird scrips that create lag. Also lots of free models aren’t optimised that well meaning that they could cause lag.

You may want to read over this topic as it explains how to optimise/reduce lag in your game very well:

21 Likes