How to make a Part change color on a click of a SurfaceGUI?
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?
1 | if (Something where a player hits a SurfaceGUI) then Game.Workspace.DanceFloor.Part 1. BrickColor = ( "Toothpaste" ) |
But I want it to also work on multiple parts.
I tried using:
2 | Game.Workspace.Part.BrickColor = ( "Toothpaste" ) |
5 | script.Parent.MouseButton 1 Down: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??