Hey all, been trying to weld/unweld parts to a character when a tool is equipped/unequipped. In this case equipping wolverine-like claws to the hands of the character.
This is a system I have already created and used for other situations and they currently all work, however I can’t seem to get this particular one to work… even though as far as i’m aware its the same code as I copy/pasted most of it in and tweaked It to fit the situation.
The claws are created and welded to the character, they are where the reference character is in my work space where I built them. - They are welded correctly as far as I can tell but they just fall through the world even though it says they are welded. Any help would be much appreciated as im completely stumped on this one.
tool.Equipped:Connect(function()
local oldHandL = folder.LHand
local oldHandR = folder.RHand
oldHandL:Destroy()
oldHandR:Destroy()
local dashFix = Instance.new("Part")
dashFix.Parent = dashUpdater
dashFix.Name = "dashUpdater"
local LH = char.LeftHand
local LHPart = class.S3.ClawHandL:Clone()
LHPart.Parent = folder
local LHMain = LHPart:WaitForChild("LHandMain")
LHPart:WaitForChild("LHandMain").CFrame = LH.CFrame * CFrame.new(0,0,0)
local LHWeld = Instance.new("ManualWeld")
LHWeld.Part0 = LHMain
LHWeld.Part1 = LH
LHWeld.C1 = LHPart:WaitForChild("LHandMain").CFrame:inverse() * LH.CFrame
LHWeld.Parent = LHWeld.Part0
LHMain.Position = char.HumanoidRootPart.Position
local RH = char.RightHand
local RHPart = class.S3.ClawHandR:Clone()
RHPart.Parent = folder
local RHMain = RHPart:WaitForChild("RHandMain")
RHPart:WaitForChild("RHandMain").CFrame = RH.CFrame * CFrame.new(0,0,0)
local RHWeld = Instance.new("ManualWeld")
RHWeld.Part0 = RHMain
RHWeld.Part1 = RH
RHWeld.C1 = RHPart:WaitForChild("RHandMain").CFrame:inverse() * RH.CFrame
RHWeld.Parent = RHWeld.Part0
RHMain.Position = char.HumanoidRootPart.Position
end)