|
| 04 Jan 2013 12:50 AM |
| My friend uses this control board with every color of the rainbow on it, then when they click a color it changes the color of certain bricks in the place, like it changes every wall in the place to pink, then when you press the red button it changes all of the wall to red. I would be interested in learning how to do this if anyone could teach me? Please let me know i'm really desperate! My friend won't teach me. Thanks! |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 04 Jan 2013 01:15 AM |
script.Parent.MouseButton1Down:connect(function() for i,v in pairs(Workspace:GetChildren()) do if v:IsA("Part") then v.BrickColor = BrickColor.new(script.Parent.BackgroundColor) end end end) |
|
|
| Report Abuse |
|
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 04 Jan 2013 01:20 AM |
better yet..
for i,v in pairs(script.Parent:GetChildren()) do if v.ClassName ~= "Script" then v.MouseButton1Down:connect(function() for i,v in pairs(Workspace:GetChildren()) do if v:IsA("Part") then v.BrickColor = BrickColor.new(v.BackgroundColor) end end end) end end
should work
ScreenGui in StarterGui Frame in that screen gui put all your buttons in that frame - each button a diff color put a script in that frame paste my script in to that script |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2013 01:21 AM |
| Azarth's post is legit, look at it. |
|
|
| Report Abuse |
|
|
Usering
|
  |
| Joined: 18 Aug 2012 |
| Total Posts: 10281 |
|
| |
|
|
| 04 Jan 2013 02:28 PM |
| waaah, but i barely know how to do that. |
|
|
| Report Abuse |
|
|