How do I weld a part to a main part without the main part moving to the other part's position?

Making something again, going well, however I notice that when the ball moves towards parts, it is supposed to weld the part to itself, but it instead moves to that part?

It works well with characters as you can see in the video below, but when it comes to a normal part, it doesn’t work.

if part.Parent:FindFirstChild("Humanoid") then
	local weld = Instance.new("Weld")
	weld.Part0 = sphere.PrimaryPart
	weld.Part1 = part.Parent.Humanoid.RootPart
	weld.Parent = part.Parent.Humanoid.RootPart

	part.Parent.Humanoid.Health = 0				
else
	if part.Size.X > 10 or part.Size.Y > 10 or part.Size.Z > 10 then
		part.Size = Vector3.new(5, 5, 5)
	end
			
	local weld = Instance.new("Weld")
        weld.Part0 = sphere.PrimaryPart
	weld.Part1 = part
	weld.Parent = part

	wait(1)
				
	part:Destroy()
end

^ part of a .Touched event

Video showing what happens:

1 Like

Try to use a weld constraint and not a weld

Thanks!! It worked, just have to fix one more issue…

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.