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

Hey this GUI script isn't working? It won't change colours when I click it. This is for you wfvj014

script.Parent.MouseButtonClick:connect(function()
script.Parent.BackgroundColor3.new = BrickColor.Red().Color
end)


This is in a local script

1 answer

✓ Accepted answer

BackGroundColor3 requires a Color3 value, not a BrickColor value.

This is how you use BrickColor,

brick.BrickColor = BrickColor.new("Really red")

This is a how you use Color3,

script.Parent.BackgroundColor3 = Color3.new(1,0,0)--Red

You also used the wrong event

The event should be MouseButton1Click, or MouseButton2Click

Applying this to your code,

script.Parent.MouseButton1Click:connect(function() 
	script.Parent.BackgroundColor3 = Color3.new(1,0,0)
end)

Good Luck!

If I helped, please don't forget to accept my answer!

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