How can i move a CFrame without destroying weld constraints?

How can i change the Cframe of a Part without destroying the weld constraints of the part?

1 Like

Are you talking about WeldConstraits or regular Weld’s?

If for Weld’s you might have to create New Weld’s in a Script whenever the Part’s CFrame is changed.

For Weld Constrait. It won’t (I think) Pretty useful.

1 Like

Is the Part in a Model?
Why not use Model | Roblox Creator Documentation?

1 Like

Weld constraints are more for permanently locking two parts together, not for moving them relative to eachother

I would personally use a normal weld and use one of the cframe offsets (c0 or c1) to move them relative to eachother

To set part1’s cframe as if it were world space you can do:

Weld.C0 = part0.CFrame:Inverse() * CFrame.new(x,y,z)

Or if you want part1 to move in a world space direction:

Weld.C0 = part0.CFrame:Inverse() * (part1.CFrame + Vector3.new(x,y,z))

Or if you just want to move it relative to the rotation of part0

Weld.C0 = CFrame.new(x,y,z)

This isnt a comprehensive list of everything you might need so if you think using welds is the right solution Id be happy to respond (and Im sure someone else would be happy to respond too) if you still need help moving it exactly how you want to move it

3 Likes