SetPrimaryPartCFrame has inaccuracies

I know this has been brought up before, but when you continuously use SetPrimaryPartCFrame, the parts separate from their intended positions over time.

Will ROBLOX fix this at some point, because the method is robust… but too flawed to utilize for major features.

1 Like

It’s just rounding errors.

Over time they compile into something bigger. I would use Motors to combine parts into one physical object instead.

Yeah, it’s been brought up here, here, and here, with most of those giving reasons why something like this can’t be fixed as easily as people think. I kind of gave up on the method and moved on to other techniques. Alternatives are you can manually apply the current matrix offset or weld them together to an anchor point and move the anchor point.

The problem:
Floating point numbers.

Solution???
Not sure exactly how easy it would be, but there is a reason game engines use floating point, though they have their problems.

Workaround:

Yeah, for this to work as you want it, you would need to maintain your relative offsets somehow. Welds are literally perfect for this. They’re optimized for it.

I don’t think that SetPrimaryPartCFrame will ever be “fixed” because it’s not intended to replace a tree of welds. The parts in your model are free to move around relative to each other, and if you tried to cache their relative offsets you’d have a bad time!