Hello! Recently, my game has been suffering from annoying lag spikes (fps drops), and it appears to have happened out of nowhere. I haven’t added much, and the content I did add I have checked multiple times and even deleted them to try and root out the cause of the lag, to no avail.
Here is some details about the lag:
- Happens at random intervals, worsens the more players there are
- Appeared randomly with no clear source of lag
- Causes FPS drops, causes spikes in CPU usage, goes back to buttery smooth afterwards
- Script performance doesn’t detect this lag / doesn’t spike up in usage for me to see
- CANNOT REPLICATE IN STUDIO. No matter what, even with 8 player testing, I can’t replicate these lag spikes in studio, and this only happens in game
I’ve tried to search through the performance stats, however nothing is wrong at all. Scripts stay under a consistent 1% activity, nothing sticks out in scriptprofiler.
The only hint I have at what’s causing this is in the microprofiler (i do not know how to use this at all, and i have a vague understanding of how to use it efficiently). Here’s a picture of the lag recorded in the microprofiler:
It seems it’s being caused by “Thread”, however this is extremely vague, and I don’t know specifically what that means. No script tracebacks are given. Does TS:JobStep stand for TweenService? I use TweenService often, but not sure if thats what that stands for. I am also unsure if server scripts can cause fps drops like these, I would think only local scripts can cause this
I have tried deleting multiple scripts to fix this, but the lag still stands. Rendering/meshes don’t appear to be the problem. This is a script problem, so where should I look? The info given by the microprofiler is vague to me, and with there being so many scripts that have these keywords, it’s hard to narrow it down. Has anyone encountered this problem before, and if so how did you find the cause? Thanks