Game Lagging Fix

Hello, I’m not sure why my game is lagging so bad. Under script performances all the scripts are running at the most 2%. Could it be the map? It is a pretty medium/big map and its all grouped into one object. If I need to give any additional information just let me know. Thanks.
Update: I am sure its the map because I stopped lagging when I moved the map to server storage. But is there anything I should do so that I can use the map without lag?

Check your map for large amounts of unanchored parts.

1 Like

I did and every part was anchored. However I am sure it’s the map because when I moved it to server storage I wasn’t lagging anymore.

Try these:

  • Check the map for any unanchored parts during runtime. There could be a script unanchoring some parts.
  • Remove parts that aren’t visible. Roblox has something like this by default, but it may help to also do it manually.
  • If you have any meshes with large polygon counts, disable their collisions or lower their collision fidelity

If those don’t work, it is possible that your map is just too big.

1 Like

I’ve reduced the map size but I’m thinking its a script now because the game lags until a specific function is called in the while true loop of functions.

If you’re using a while loop, make sure you include some form of task.wait, or your game will lag tremendously.

Here are some alternatives to a while loop:

Without knowing the specific purpose of your loops, I can’t recommend a specific solution. However, it’s worth taking a look these options, as they may be more suitable.

1 Like

I am using a task.wait() but maybe I should try using runservice thanks.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.