local Model = script.Parent local Main = Model:WaitForChild('Main') local OtherPart = Model:WaitForChild('Part') local parts = Model:GetChildren() for i = 1, #parts do if ((#parts[i].ClassName == 'Part')) then local Weld = Instance.new("Weld",Main) Weld.C0 = Main.CFrame:inverse() * OtherPart.CFrame Weld.Part0 = Main Weld.Part1 = OtherPart end end
I was trying to make a weld part for my new cafe but when I tried to make it, it didn't work?
So it might be, your affecting the offset for C0 aka Part0, but, when you set Part1, your not setting an offset for C1 aka Part1. Try the code below, and play with it for whatever works for what your doing.
Weld.C1 = OtherPart.CFrame:inverse() * Main.CFrame -- Or whatever, you think is appropriate.