as script what did I do wrong?

{Color3.fromRGB(255,0,0),Color3.fromRGB(0,255,0),Color3.fromRGB(0,0,255)}

for a,b in next, colors do
    for i,v in next, script.Parent:GetChildren() do
        if not v:IsA("Script") then
            spawn(function()
                for i = 0,100,1 do
                    local inc = i/100
                    v.BackgroundColor3 = v.BackgroundColor3:lerp(b,inc)
                    wait()
                end
            end)
        end
    end
end

2 comments

0

Any errors?

1

is colors defined