Hello everyone I have a question how would I fix game lag on my roleplay game with a large map and lots of detailed buildings? Does unions make it worst? Do I adjust scripts?
My map has 41k parts and not many buildings it has 71k instances idk what those are
the game lags in certain parts I started to union stuff I don’t know if that helped
Adjusting render distance can go a long way, whether it be a system provided by the server or something a client has control over. Unions definitely cause some lag, but it should not be a large issue. If there are too many tweens running, that can also affect it. There are lots of things that you can change, it just matters what is ok to change. Let us know!
Howdy!
In order to reduce lag in game please make sure you do not have tons of unions since those are super unoptimized, also you can turn on streaming enabled more on that found here → Content Streaming | Roblox Creator Documentation
**You can just optimize everything by double checking your build for extra pesky parts AND OR objects just laying around the workspace that you can delete to potentially lower that part count!
*note unions can be used to make some objects in studio look a certain way otherwise you could not do with the other tools that are provided to you so I’m not saying they are terrible haha just refrain from the over use of the union tool. / *note 2 – You could also have tons of lag coming from very unoptimized scripts in your game seeing that you have around 70k instances.
The physical size of the map is not a big deal. It is more about having a manageable fidelity. I’d consider looking at individual models, such as trees, and see if they have significantly more objects than what is necessary. Also, I’d be sure to anchor everything, if you haven’t already.
To add onto all the points brought up already… disabling shadows where you dont need them, setting cancollide to false where you dont need it, also helps to keep large maps performant.