Can somebody help me? I'm trying to get rid of the line were it say "Left Arm" but it didn't work for me. When I tested it my left arm fall off instead.... I want only the "Right Arm" to work, not both arms. I've tried many times and the arm keep falling off, what did I do wrong? Can you guys help me?
Here's an image to see what I'm talking about:
https://gyazo.com/4e24b619184f5c3c08fd9b819a69277b
This is a regular script that goes into the tool:
Name of this script: (WeldArm)
Tool = script.Parent;
local arms = nil
local torso = nil
local welds = {}
function Equip(mouse)
wait(0.01)
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"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = nil
sh[2].Part1 = nil
local weld1 = Instance.new("Weld")
weld1.Part0 = torso
weld1.Parent = torso
weld1.Part1 = arms[1]
weld1.C1 = CFrame.new(1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(0))
welds[1] = weld1
local weld2 = Instance.new("Weld")
weld2.Part0 = torso
weld2.Parent = torso
weld2.Part1 = arms[2]
weld2.C1 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(0), 0)
welds[2] = weld2
end
else
print("sh")
end
else
print("arms")
end
end
function Unequip(mouse)
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = arms[1]
sh[2].Part1 = arms[2]
welds[1].Parent = nil
welds[2].Parent = nil
end
else
print("sh")
end
else
print("arms")
end
end
Tool.Equipped:connect(Equip)
Tool.Unequipped:connect(Unequip)
Many thanks my friends!

2 comments
If the script isn't working, please comment that it is not so that I can inspect why.
Thanks! It works just fine the way it is. Thank you =)