I don’t know what updateGeometry , finalize , and generateBatchGeometry mean, but they sound like something to do with the physics engine. Since your game is an obby, it’s possible that the amount of parts is causing lag in the game. To fix this, you can:
disable part collision, can touch, and can query when possible
turn off cast shadow for small parts or parts that dont need shadows
set the render fidelity of unimportant mesh parts to performance
set the “Technology” property in lighting to compatibility or voxel
make a local script to remove parts from workspace when the player is far away from them
Since the lag is happening only every other frame, it’s also possible that it could be caused by a script. Try using Ctrl + Shift + F and search “while” to look for while loops that could be causing lag.
We’re also having this issue in our games, and its exactly how you described it. It only happens when there are a bunch of players in the game. Did you figure out the problem?
As far as I could tell from other forum posts and some studio tests, it happens when a model with a bunch of meshes/parts inside of it has a change applied to it. It invalidates the cluster and needs to be rebuilt and cached again. ensure your map is not a single model OR don’t make changes to often to a big model with a bunch of meshes inside of it.
Again this is just my understanding of it and I could be wrong.
I tested this by spawning my character in with 200 different accessories, the game lag spikes any time I change anything about him visually such as adding another accessory or even changing the transparency of one of the hats.
Further research seems to point at this being a humanoid related thing, please see my later post.
Alright after some more research it seems to be related to humanoids, any basepart changes inside of them causes them to rebuild.
But if they are outside but still welded to humanoid its no problem.
From now on, ensure you aren’t updating something inside your character too often, if you need to add accessories, try adding them to workspace and then weld them to the character.