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

Help With GUI And Color Changes?

Asked by
Scootakip 299 Moderation Voter
8 years ago
for i,v in pairs(script.Parent:GetChildren()) do
    if v.ClassName == "TextButton" then
        v.MouseButton1Click:connect(function()
            for i,z in pairs(game.Workspace.Zombies:GetChildren()) do
                if z.Owner.Value == script.Parent.Parent.Parent.Parent.Parent.Parent.Name then
                    z.Torso.BrickColor = BrickColor.new(v.Name)
                end
            end
        end)
    end
end

This script is supposed to change a zombie's torso color when a textbutton that has the name of a Brickcolor is clicked, but it doesn't work. No error or anything, just nothing. Help?

Answer this question