Yeah, you’d have to modify the c0/c1. It’d be easier just to use a rig editor plugin instead, though. It does the same thing but is just easier to use.
local weld = Instance.new("Weld")
weld.C0 = attachment0.CFrame
weld.Part0 = attachment0.Parent
weld.C1 = attachment1.CFrame
weld.Part1 = attachment1.Parent
weld.Parent = attachment1.Parent --any parent under workspace to make the weld active