Hey! So I have created a dual wield script for R6 but it doesn't work. What I mean is that the arm appears but the tool doesn't appear on the other arm.
Tool = script.Parent
local arms = nil
local torso = nil
local weld55 = nil -- left arm
local welds = {}
-- Weld the Second Wep --
local prev
local parts = script.Parent:GetChildren()
for i = 1,#parts do
if parts[i]:IsA("BasePart") then
if (prev ~= nil)then
local weld = Instance.new("Weld")
weld.Part0 = prev
weld.Part1 = parts[i]
weld.C0 = prev.CFrame:inverse()
weld.C1 = parts[i].CFrame:inverse()
weld.Parent = prev
end
prev = parts[i]
end
end
-- Weld the Second Wep --
function Equip(mouse)
wait()
arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
torso = Tool.Parent:FindFirstChild("Torso")
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = nil
local weld1 = Instance.new("Weld") -- left arm
weld55 = weld1
weld1.Part0 = arms[2]
weld1.Parent = arms[2]
weld1.Part1 = arms[1]
weld1.C1 = CFrame.new(3, 0, 0)
welds[1] = weld1
end
else
end
else
end
end
function Unequip(mouse)
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = arms[1]
welds[1].Parent = nil
end
else
print("sh")
end
else
print("arms")
end
end
Tool.Equipped:connect(Equip)
Tool.Unequipped:connect(Unequip)
I am currently working on it but could anyone give me an idea on why it isn't working. This is for the R6 type avatar, so I believe the problem is that I didn't add an instruction to duplicate the handle in the script. Also, I'm trying to make it that I do not need 2 handles. I just want 1 handle

1 comment
Sorry for the mess up lol