Tweening near meshes causes significant FPS drops

Hello,

I am creating a fish tank, in which I am tweening several fish around to a random CFrame position within the boundaries of the tank. This is done on the client, and it is quite simple, until I noticed that it would cause significant FPS drops (60 to 30). I added a check that only makes the fish move when you’re within 50 studs of the tank, so this proves to me that the tank is causing the FPS drops, as I have a steady 60 FPS when I am not near it.

I played around with this for a while, and noticed that when I put the exact same fish tank & scripts into another game, the FPS was 60. If I moved the fish tank away from the building that it is inside in the original game, I went back to a steady 60 FPS. This shows that the FPS drop is a result of the building that it is inside of, but the build does not cause any drops on its own. After a while of experimenting in studio, I noticed that deleting all the meshes made my FPS stay at 60 and not drop.

I’m not sure why tweening an object in a building full of meshes is causing a significant FPS drop. The code is completely fine considering that it has no problems when it is away from the building. The number of fish swimming in the tank (1 vs 8) also does not have much of an impact on it, as the FPS still drops regardless of the number.

There isn’t really that much meshes, and most of them are duplicates of each other, so I’m not sure how it could be that intensive on performance. I’ve asked several others, and I’m pretty much lost in terms of what to do here. The code seems to be fine, and deleting every mesh isn’t really an option here.

I appreciate any help.

4 Likes

Could be physics, are you sure that anchored is set to true?
Could be the mesh part if it’s too big?
Set render fidelity to automatic and see if that helps.

If it’s really cause you tween around a mesh and not because of your script or game, this is an engine bug, not valid for scripting support.

Anchored is true, cancollide is false, the meshparts being tweened are quite small. Any overly large meshes in the area (such as hills) are cancollide false. I tried setting renderfidelity to automatic and it didn’t have any impact on it.

I’m pretty confident that it doesn’t have anything to do with my code considering how it works when it’s not near the building, but I’m not entirely sure that this is a bug and not just something on my end.

1 Like

Same happens to me and ive not heard anything back yet from dev team. For me it happened when seated on roblox default seat with a plane cockpit that has multiple surface gui based text labels and neons. I assumed these are least taxing and roblox but I seem wrong, when the plane takes flight the fps completely tanks and its definitely not the plane as without those surface gui and neons on the fps is normal.

Most of my planes are all entirely mesh and if theres any mesh interior placed in there not only does it tank fps but the interior seems shaky as if you’ve just gone into the start of floating point errors. This defo seems like an issue with roblox and mesh handling/ physics.