My game runs smoothly until you sit down, it causes a lag spike

How many parts are the seats made of?

1 Like

It’s just 1 seat part, they aren’t grouped.

1 Like

Ensure you really don’t have a backdoor. Roblox seems to have more malicious developers making plugins that insert backdoor scripts deep inside your game.

Use the Explorer and search for the word ‘script’ and look in every script you have ingame.

If seats cause significant performance drops, you could create your own implementation of seats.
Seats utilise welds, so, you could send a request to the server and create your own weld between a seat and the player. If you don’t want to implement your own version of seats, I think I might have a vague idea of what may be causing that lag, Network Ownership, according to the Roblox Wiki https://developer.roblox.com/en-us/articles/Network-Ownership, even though you probably aren’t dealing with cars, your models network ownership may be transferred to the player, try manually setting the models network ownership, I doubt it’s the problem but, it’s worth a try.
Edit* If it is network ownership that’s causing the problem, try anchoring the models primary part(if it has one)

2 Likes

Use the microprofiler again but when you sit down with it open, press CTRL + P. You can then look at every process that happened in every frame. All you really need to know is long bar = bad. Find out which bars are the long ones and post them here.

Here’s a video that shows use of the microprofiler when paused.

1 Like

Here’s what I get when I did that, it was a little confusing to look at but I hope this can help -

1 Like

I remember having that exact problem five months ago. It’s caused by using too many lights.

Builders like to do this thing where they add 20 of the same lights into one part. This is inefficient as hell and you should really just use one light and turn up the brightness. So make sure to look for that.

If you have multiple lights really close together, replace it with one light that has a larger range.

2 Likes

I just removed a bunch of lights, it didn’t change very much

1 Like

Im actually having this exact issue with my game to. Sitting down in a area with a lot of instances makes it lag a lot more. Yet if you move the seat to somewhere else without a lot of instances its lag free.

2 Likes

This may sound real odd but try moving the books/bookcases/just everything except for the seat far away. Then try sitting back in the seat, if nothing changes, something is wrong, if it begins to be lag free, it may be due to the concentration of alot of instances/objects near eachother. This may be intensified by the chair due to the fact it creates a weld when you sit though I may be wrong?

1 Like

I mean yea removing everything around it makes the lag spike nonexistent . But am I just not allowed to have any seats in my entire game? Seems like this might be a more band-aid fix of just removing the seats rather then finding the root problem that is causing the lag spike.

1 Like

I actually tried deleting all the books, and even deleting every script, and it’s STILL happening !

1 Like

Thought it was something unique to my game lol. Having the same issue, sometimes my FPS goes from 60 all the way down to the 20s. Super strange bug

1 Like

It seems like the lag problem has gone away now somehow? I played my game this morning and I didn’t lag from sitting, the issue must’ve resolved itself somehow.

The problem has not gone away for me. Still lags terribly when I sit down.

I am currently having the same issue here. This is very strange. I wonder what’s the real cause of this.

Im seeing this issue too more so of recent with my Aircraft. I can’t figure out why considering everything was fine a few weeks ago and even more issue only shows up at random times and can last for a while.log_B0C24_microprofile_20200518-014802.html (229.6 KB) Im assuming its a recent Roblox change.

Fps drops from 60 to 20 but more so this happens even when not seated. Your issue also is similar to this issue: Need some help with Lag Spikes in my game! where below someone posted a place which replicates for some reasons seat lag aswell as lag when not seated

1 Like

This is still a prevalent issue. I was forced to remove seats in general from my last commission and have tried multiple changes on the project. I’ve only discovered mitigating the lag through switching the lighting to compatibility. When I sit, both CPU and GPU increase, and if any player sits down, the rest of the players will experience a hit to their CPU and GPU.

2 Likes

I’ve posted a bug report about this issue here: https://devforum.roblox.com/t/severe-performance-bug-triggered-easily-with-sitting-down-in-a-seat-with-many-parts-in-the-place/632675

Here’s some advice from the end of the post:

2 Likes