Aerodymier
(Aerodymier)
September 11, 2020, 8:50pm
1
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.
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:
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
Aerodymier
(Aerodymier)
September 11, 2020, 10:40pm
4
That’ll probably break the animations.
Aerodymier
(Aerodymier)
September 11, 2020, 10:40pm
5
I’ll try later and update the topic.
1 Like
Aerodymier
(Aerodymier)
September 13, 2020, 9:34pm
6
Unfortunetaly, didn’t work. Rifle didn’t even weld to my hand somehow.
Aerodymier
(Aerodymier)
September 13, 2020, 9:38pm
7
I changed the welded part to primarypart (handle of the rifle) and it’s like this now:
Aerodymier
(Aerodymier)
September 14, 2020, 9:30pm
8
Tried everything, still doesn’t work. Does anyone have a suggestion?