Basically when I am standing in big buildings lag spikes happen. When I use micro profiler and pause on one of these spikes this is what I see.
I dont fully understand what this means. Could anyone point out what the issue may be? Thanks in advance!
Do you have lots and lots of Parts in your buildings?
The ‘GetPartBoundsInRadius’ section seems to be going off the charts.
Idk about “lots and lots”. I think I built with a reasonable amount of parts and even converted my props into meshes to help reduce lag. The spikes do occur only when walking around areas with higher part counts though.
How many parts are in your buildings? A rough number is fine.
You said ‘higher parts counts’ but your version of high and my version of high can be 2 totally different numbers.
I actually have a plugin that shows the amount of parts when I select things. I have one build thats mostly modeled all together but has some props that aren’t apart of the model. The model itself is 7000+ parts total. (Its a destroyed castle with a basement that goes pretty deep so your not super close to everything all at once). The props probably add very little to that part count I doubt it goes over 8000.
That build causes lag when I walk through it. If I’m looking correctly (I’ve never used microprofiler before so correct me if im wrong) “GetPartBoundsInBox” in a script called “effect stuffs” is causing the lag right? I believe I know what thats from. I have a loop that constantly checks for players within like a 200 stud radius for something. I could probably use collection service to tag all player characters then have a whitelist of only player characters to stop it from yielding for so long.
Just make that script inactive to see if it’s the only cause.
If you are checking everything in a 200 stud radius for just the players then that script is going to be really slow.
Sounds like you’re on the right track with your idea to tag the players.
Yup that worked, I appreciate the help!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.