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

Why will this not work?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

Why would this not work? Help please!

Thanks!

script.Parent.MouseButton1Click:connect(function() 
        script.Parent.ImageLabel.BackgroundColor3 = Color3.new(0,170,0)
            if script.Parent.Parent.OpenClose.MouseButton1Click() then
                script.Parent.ImageLabel.BackgroundColor3 = Color3.new(255,0,0)
        end
end)

1 answer

Log in to vote
0
Answered by 9 years ago

Color3 values goes from 0 to 1. If you want to convert real RGB to Color3, then you should have a function like this:

function Color(r, g, b)
     return Color3.new(r/255, g/255, b/255)
end
0
That did not work, sorry. PresidentAlvarez 5 — 9y
0
What's the error? Tytanlore 15 — 9y
Ad

Answer this question