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

Can someone help me fix my error in a Color Changer script?

Asked by 1 year ago

this is the first time im mixing strings and brickColors together so i have no idea how to fix it. Everytime the string value changes it automaticly turns the part gray even though i type in the color correctly every time

UI.BrickColor.ColorValue.Changed:Connect(function(text)

    print("changed")

    local selection = game.Selection:Get()

    if selection[1] then
        for index, object in pairs(selection) do
            local parts = object:GetDescendants()

            for _, descendant in pairs(parts) do
                if descendant:IsA("BasePart") then

                    descendant.BrickColor = BrickColor.new(text)

                end
            end
        end
    end
0
Can you tell what the "text" is? Xapelize 2658 — 1y
0
And what's the purpose of the game.Selection:Get() on this one Xapelize 2658 — 1y

Answer this question