Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
|
| 20 Oct 2015 08:50 PM |
game.Players.PlayerAdded:connect(function(p) p.Chatted:connect(function(msg) if msg:lower() == "really red" and p.Character then for _, part in next, game.Workspace.Circuit:GetChildren() do if part:IsA("BasePart") then part.BrickColor = game.Workspace.RedPart.BrickColor; game.Lighting.FogColor = game.Workspace.RedPart.BrickColor.Color; game.Workspace.Torch.Glow.BrickColor = game.Workspace.RedPart.BrickColor; game.Workspace.Torch.Glow.Fire.Color = game.Workspace.RedPart.BrickColor.Color; end end end end) end)
so i have this, and it works perfectly. but instead of going in and adding a brick with a certain brick color and a script for each brick, i want the script to cycle through all the brick colors to match the color they said
help? :D |
|
|
| Report Abuse |
|
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
| |
|
|
| 20 Oct 2015 08:59 PM |
msg = msg:lower() local an = msg:sub(1,1) an = an:upper() local en = msg:sub(2) local BrickColor = BrickColor.new(an..en)
if(not BrickColor)then print("BrickColor not found!") end |
|
|
| Report Abuse |
|
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
|
| 20 Oct 2015 09:03 PM |
Thanks Cody! Where would I put that in the script? And does it need editing at all? I'm using this as a learning experience |
|
|
| Report Abuse |
|
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
| |
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
| |
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
| |
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
| |
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
| |
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
| |
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
| |
|
Optimxl
|
  |
| Joined: 26 Feb 2011 |
| Total Posts: 9430 |
|
| |
|