Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is my Transparency Script not working properly?

Asked by 4 years ago

I have been trying to create a simple tool where if you equip it, certain parts go invisible, these parts are called "Part1" of a morph.

Here is my script:

local arm1 = script.Parent.Parent.Parent:GetChildren("Arm1")

local tool = script.Parent

function equipped()
    for i=1, arm1 do
        local part = arm1[i]

        if part.Name == "Part1" then
            part.Transparency = 1
        else
                part.Transparency = 0
        end
    end
end
function unequipped()

end
tool.Equipped:connect(equipped)
tool.UnEquipped:connect(unequipped)
0
for i = 1, #arm1 do Thetacah 712 — 4y

Answer this question