Tweening welded parts problem

So i have 3 parts:


only blue is anchored, green part CFrame is tweened to go up and i want red part to go with green part but no matter if i use normal weld or weldConstraint the red part wont go with green one.

If you directly change the CFrame of a BasePart (like with tweening), it will destroy the attached Weld objects from that part. Meanwhile with WeldConstraints, it does not get destroyed, but changes the offset. Welds and WeldConstraints only move attached objects when the parts are affected by physics.

If you want to simulate welding, you can change the position of the red part every frame directly after the physics simulation completed (RunService.PostSimulation):

local RunService = game:GetService('RunService')

local part0 = workspace.GreenPart -- Part to move
local part1 = workspace.RedPart -- Part to "weld"

local offset = CFrame.new(0, 0, 0)

RunService.PostSimulation:Connect(function()
	part1.CFrame = part0.CFrame * offset -- MUST be in this order, unless you want offset to be in global space
end
1 Like