How to reduce lag and optimize map with many parts

I’m in the process of making a map, and I’m using parts and unions for most of it because I think this kind of style looks good, but since I have so many parts, it’s starting to lag my game way more than I expected. What are some ways that I can optimize my game so that it lags less? I’ve seen other games use this style and there is no lag at all, which is what I want


Attached are screenshots of what I have so far, it’s just a small portion of the map and it’s already beginning to lag my game.

I have a feeling the main culprit may be the buildings. Are you able to provide closer screenshots of the buildings? Like the roofs, walls, railings, or interiors if the buildings are enterable. Also, are any of the buildings hollow? And can you identify the unions you are using in the buildings (if any are being used)?

Unions are usually very performance heavy, so you should probably change them to meshes with or union to mesh plugin or just watch a YouTube video on it.

You should look into streaming optimizations.
https://create.roblox.com/docs/workspace/streaming

if there are builds that you wont change convert them into meshes with blender, obviously keeping the textures. This is from experience, my game had around 51 buildings 250 parts each one, averaging 30fps. Now these same buildings i converted them into meshes and they are now just 51 buildings with 4 meshes each one, now averaging stable 60fps. that’s just one example.

Try to use the less parts as possible, meaning if you have a mountain that can be done with 1 part, then do it with 1 part. Not with 2 or 3, etc.

Also use streaming enabled

If you use meshes, renderfidelity to performance, and if they need to be collidable, use collisionfidelity to default.

If there’s decorations, turn the cancollide off, cantouch off, canquery off.
If the meshes are decorations, do the same as above and put collisionfidelity to box.

That should also help much, again speaking from experience

and now remember:

1 mesh is better than 10 different parts

i also have a post I 100% recommend reading:

i hope this helped, and avoid unions as much as possible, meshes are much better optimised and design-wise

whats your part count? try to limit your amount of parts and only use 1 part instead of 4 parts per face

Turn off collisions for any part that does not need them. Your pebbles, out-of-bounds objects, and decorative wall patterns all having collisions off can do wonders for performance.

Heyo, there are quite a few ways to help reduce lag and optimize builds:

  • Turn off CastShadow on any small parts that may not need cast shadow on them, shadows can produce lag over time as that is one more thing that the engine has to render
  • Enable Streaming, this can help with rendering parts that are only close to the player, and parts that are further out will get lower render quality and reduce the triangles on them, so it can dramatically increase your performance
  • Collisions: on any parts that are not going to interact with the character at ALL, turn off CanCollide on them, this can dramatically increase the performance of your game

Another reply mentioned turning the buildings into meshes using Blender, and this can also help with the performance.

There is a really useful article on optimizing games, here is the link if you would also like to see that one: Real world building and scripting optimization for Roblox

I know another reply already attached this article, but this is a really good article on optimizing games.

Also, what are the performance stats on the game?