I can't manually weld part correctly

I’m making a rifle and I’m stuck at welding gun to hand. I tried the most basic “Handle” method but it looks like this.

image

Then I made a manual weld script,

local tool = script.Parent.Parent

tool.Equipped:Connect(function()
	local m = Instance.new("Weld", tool.PrimaryPart)
	m.Name = "HandWeld"
	m.Part0 = tool.HandlePart
	m.Part1 = tool.Parent.RightHand
	m.C0 = tool.HandlePart.HandleAttachment.CFrame
	m.C1 = tool.Parent.RightHand.RightGripAttachment.CFrame
end)

And it looks like this:

I didn’t even add C0 and C1 on the revolver but it works fine on it. (I tried rotating attachments but nothing worked).

However, it shall look like this:

image

Any help would be appreciated.

1 Like

Couldn’t you try to change the grip of the tool instead of welding it to a character’s/the player’s hand?

Or you really want to use welding?

1 Like

Hello, I suggest you to refrain from using Weld. Instead, use WeldConstraint.

This is because if you use Weld, you will have to manually set CFrame of parts that are being welded together by Weld.C0 and Weld.C1, but if you use WeldConstraint, you don’t need to manually set CFrame of those parts; thus using WeldConstraint should fix your problem.

1 Like

That’ll probably break the animations.

I’ll try later and update the topic.

1 Like

Unfortunetaly, didn’t work. Rifle didn’t even weld to my hand somehow.

I changed the welded part to primarypart (handle of the rifle) and it’s like this now:

Tried everything, still doesn’t work. Does anyone have a suggestion?