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

Color3.new is BackgroundColor3 help?

Asked by
NotSoNorm 777 Moderation Voter
10 years ago

I am trying to make it so when clicked the Gui elements below turn the the background color of the button, It keeps returning as a black color, Not a green or Pink etc. Help?

tt = script.Parent.Parent.Parent.Parent
xx = Color3.new(script.Parent.BackgroundColor3)
script.Parent.MouseButton1Down:connect(function()
    tt.Parent.OptionFrame.BackgroundColor3 = xx
    wait(0.06)
    tt.Parent.ScrollingFrame.BackgroundColor3 = xx
    wait(0.06)
    tt.Parent.SettingsButton.BackgroundColor3 =xx
    tt.Parent.ClearCurrent.BackgroundColor3 = xx
    tt.Parent.Close.BackgroundColor3 = xx
    wait(0.06)
    tt.Parent.Open.BackgroundColor3 = xx
    tt.Parent.Pitch.Down.BackgroundColor3 = xx
    wait(0.06)
    tt.Parent.Pitch.Up.BackgroundColor3 = xx
    tt.Parent.Volume.Down.BackgroundColor3 = xx
    tt.Parent.Volume.Up.BackgroundColor3 = xx
    tt.Parent.Pitch.BackgroundColor3 = xx
    wait(0.06) --These are wait breakers :)
    tt.Parent.Volume.BackgroundColor3 = xx
    tt.Parent.Header.BackgroundColor3 = xx
    tt.Parent.SecondHeader.BackgroundColor3 = xx
end)
0
You can just change the xx variable definition to "script.Parent.BackgroundColor3" Shawnyg 4330 — 10y
0
It already is a variable NotSoNorm 777 — 10y
0
Oh wait, Nevermind. Thanks :) NotSoNorm 777 — 10y
0
No problem mate. Shawnyg 4330 — 10y

1 answer

Log in to vote
2
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
10 years ago

You can just change the xx variable definition to script.Parent.BackgroundColor3

I put this as an Answer so others know it was already answered.

Ad

Answer this question