Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Color3.new is BackgroundColor3 help?

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)

4 comments

0

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

0

It already is a variable

0

Oh wait, Nevermind. Thanks :)

0

No problem mate.

1 answer

✓ Accepted answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.