Moving models with CFrame causing lag

Hey xg here,

So I’m trying to move models using :SetPrimaryPartCFrame, I’ve tried unachoring of all parts and welding to the primary part to reduce physics lag, which did not work.

Examples:
Model [No Lag]
Model [Causing lag]

Notes

  • Movement is handled by client and uses a RayCast to return mouse positions and uses objectPart:GetTouchingParts() to detect collision.
  • Model is not re-created every time it moves nor changes colour.

I can’t see the lag on the video, what kind of an lag are you talking about?
Performance drop as in a freeze? Or network lag?

If it’s a performance drop/freeze: use the microprofiler or the developer console profiler to see if that shows any obvious issues.

Not much you can do. Try to keep part count low in your models so that the engine doesn’t have to iterate as much.