Trying to weld character to another character

Hi. I’m trying to weld a HumanoidRootPart to another one. The problem is that the character goes far away (into the middle of the map I think).

Script:

local weld = Instance.new("Weld")
weld.Parent = script.Parent.HumanoidRootPart
weld.Part0 = game.Workspace.DummyTest2.HumanoidRootPart
weld.Part1 = script.Parent.HumanoidRootPart
weld.C0 = script.Parent.HumanoidRootPart.CFrame + (script.Parent.HumanoidRootPart.CFrame.LookVector * 2)

Any help appreciated.

I see you’re trying to make it infront of the first rootPart, if I havent misunderstood.
Basically the world position changes to (0, 0, 0) relative to the welds position
This should work

local weld = Instance.new("Weld")
weld.Parent = script.Parent.HumanoidRootPart
weld.Part0 = game.Workspace.Rig.HumanoidRootPart
weld.Part1 = script.Parent.HumanoidRootPart
weld.C0 = CFrame.new() + script.Parent.HumanoidRootPart.CFrame.lookVector * 2

Hope this helps!

My bad, I accidentally changed DummyTest2 to RIg on mine, here’s an update:

local weld = Instance.new("Weld")
weld.Parent = script.Parent.HumanoidRootPart
weld.Part0 = game.Workspace.DummyTest2.HumanoidRootPart
weld.Part1 = script.Parent.HumanoidRootPart
weld.C0 = CFrame.new() + script.Parent.HumanoidRootPart.CFrame.lookVector * 2