Welding Multiple Part Accessory's

I’ve been trying to make an accessory with a bunch of parts. I have a textbutton that clones the accessory on the local players head when clicked. The accessory contains a handle part and a few other parts. Ive decided to weld the parts inside of the accessory to the handle of the accessory through a script using weldconstriants. Although the problem is that whenever I join my game and try on the accessory, only the handle part appears on my head and not any of the other parts that were welded. Here is what it looks like when I join.

When I move, every thing moves with me. Its just that the welded parts should be right on top of the handle part.

Here is my script that welds the accessory together:

local accessory = script.Parent

local handle = accessory:FindFirstChild("Handle") 

if handle then
	for _, part in pairs(accessory:GetChildren()) do
		if part:IsA("BasePart") and part ~= handle then
			local weldConstraint = part:FindFirstChildOfClass("WeldConstraint")
			if not weldConstraint then
				weldConstraint = Instance.new("WeldConstraint")
				weldConstraint.Parent = part
				
				weldConstraint.Part0 = handle
				weldConstraint.Part1 = part
			end
		end
	end
end

Thanks.

1 Like

Yea i had this problem when using WeldConstraint too but when i changed to Weld it actually fixed that so i recommend you to try it

2 Likes

Just use Welds to join the Parts to the Handle as you build the tool. This makes it a complete unit so you don’t have to use a Weld script.

Another thing, when you Weld something with a Part0 and Part1 but don’t set the offset (either the C0 or C1 CFrames) then all the Parts you weld together will weld at the same location. I think if you’ve got one or more of the Parts’ or Handle’s Pivot changed with the Pivot Tools that might explain the offset you are getting. Click each item and then the Reset button in the Pivot Tools to reset the Pivot point.

Thanks for the response. I reset the pivot points for each of the parts like you said. I also welded the parts to the handle. But when I do weld the parts to the handle the parts move to the middle of the handle and change position. I might be misunderstanding what you said but I kept the C0 and C1 CFrames values blank.

Here is one of my welds that is in one of the parts:

image

Also you mentioned tool in your response, this is an accessory.

I tried using weld but it just moves all of the parts from there original position and into the middle of the handle. This happens if I make part0 the part and part1 the handle part.

Click the blue links in my previous post. Welds are explained in the first one.

If you leave the C0 and C1 blank they’ll be 0,0,0, which is the center of each Part.
Change only 1 of them to 0,1,0 and you’ll see how they offset the parts when they’re welded together.

1 Like

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