I am very new to scripting, and I have played LBP2, and LBP3 and the Techno seems so simple. But Roblox's LUA seems so difficult. I want to make a little booth, where you click a SurfaceGUI of a certain color, and many parts turn colors. For example, a player hits a Blue SurfaceGUI, then 10 blocks infront of the player turns Blue. Or a player hits a SurfaceGUI and bricks infront of him turn random. I do got an idea on what to do, but I need help on the Click thing. Here is what I would do. Just tell me if I do anything wrong. Can you help me?
if (Something where a player hits a SurfaceGUI) then Game.Workspace.DanceFloor.Part1.BrickColor = ("Toothpaste")
But I want it to also work on multiple parts.
I tried using:
function color()
Game.Workspace.Part.BrickColor = ("Toothpaste")
end
script.Parent.MouseButton1Down:connect(color)
But i get the error:
"Workspace.ColorThePart.SurfaceGui.TextButton.Script:2: bad argument #3 to 'BrickColor' (BrickColor expected, got string)"
Can someone help me with this??

1 comment
Like in the answer bellow, you need to change colors by setting the parts BrickColor = to "BrickColor.new("ColorNameHere")