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

How can I fix my hat transparency script?

Asked by 5 years ago

I made a script that makes your hats transparent if you sit in the chair and it wont work, any thoughts?

script.parent.ChildAdded:Connect(function()
    for a=1,#b do 
        if b[a].className == "Accessory" then 
            b[a].Handle.Transparency = 1
        end
    end
end)

script.parent.ChildRemoved:Connect(function()
    for a=1,#b do 
        if b[a].className == "Accessory" then 
            b[a].Handle.Transparency = 0
        end
    end
end)

Player = script.Parent.Parent.Parent.Parent.Parent.Character
b = Player:GetChildren() 

Answer this question