Moving large model(4k parts) on client

I have this huge drydock model that i want to move so it looks like its floating towards a spaceship. It consists of 3.9k parts, so moving it becomes laggy, and I am trying to find a way to reduce this lag.

First I tried moving it with a prismaticconstraint, and welding everything to one part. This was a huge performance issue for the physics engine, even when cancollide and cantouch were off for all parts.
I am now trying to move it on the client, and using :pivotto() to move it each frame. This caused an fps drop as seen in the microprofiler here:

I was thinking of using bulkmoveto(), but then I would need to lerp all the separate cframes of each part, which im guessing will also hit performance.

Does anyone know what else I could use to try to make it move without lag?

What about welding model togheter using WeldConstraint and only moving root (primary part)?

That would still move all the parts connected to it. And cause lag

Why not just CFrame it? You can just move the actual ‘Model’ object that way.

I saw you said :PivotTo was causing lag. Is there a way you could break it up into smaller models, and (because its at a distance) prioritize moving the closest ones to the ship first, and then have the rest of the models catch up over a period of time.

move primary part using :PivotTo and for even better result straight up cache the method:

local PivotTo = game.PivotTo


PivotTo(PrimaryPart,CFrameHere)


Thinking more on this, in a lot of games, things are based on illusion. Why is your model so detailed, is it due to interior spaces where the player will walk around inside? If so, maybe you could have a purely outside lower part model be used until you dock then replace it with the more complex model for inside spaces.

You should make it have less parts

1 Like

I have removed the inside already, itll be put in workspace from serverstorage once the outside part is done moving. Also, when it is moving, people are able to go outside into space and fly around. That way they could see the parts without detail.

i found out that testing in the roblox client there was no lag at all.

If you were moving it once, I have no idea if it will work, but perhaps a solution could be to parent it to ServerStorage, then use PivotTo to the location, and then re-parent it to workspace.

As others have suggested just try have less parts

Or, if it’s purely visual and you want to make it look like it’s moving, maybe you might be inspired how stop-motion animators make things look like they are moving by simply moving the backdrop

Just found this on Google: