The gun I am welding won't appear on my characters right arm. This is a LocalScript in a hopperbin

player = game.Players.LocalPlayer

ra = player.Character:WaitForChild("Right Arm")

humanoid = player.Character.Humanoid

gun = game.Lighting.Flintlock

Tool = script.Parent
 
Tool.Selected:connect(function()
	gun:Clone()
	gun.Parent = script.Parent	
     	local Weld = Instance.new("Weld")
		Weld.Part0 = ra
		Weld.C0 = ra.CFrame:inverse()
		Weld.Part1 = script.Parent.Flintlock
		Weld.C1 = script.Parent.Flintlock.CFrame:inverse()
		Weld.Parent = script.Parent.Flintlock
		script.Parent.Flintlock.CFrame = ra.CFrame * CFrame.new(0,0,-1)
		script.Parent.Flintlock.Anchored = false
end)

3 comments

0

I don't know much about welds, but try positioning it with the CFrame before setting the weld c0/c1

0

I didn't work :/ Thanks for the feedback though.

0

You shouldn't try repositioning the object after the object is welded, it will break the weld so you should reposition the object before you weld it.