|
| 05 Dec 2011 09:03 PM |
When I wrote this script in a brick it doesn't work! I want it to be like a dance floor. I expect random colors to be applied to the brick.
if true do
script.Parent.BrickColor = BrickColor.random() wait(.5)
end |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 05 Dec 2011 09:06 PM |
while true do wait(.5) script.Parent.BrickColor = BrickColor.random() end
|
|
|
| Report Abuse |
|
|
Beauu
|
  |
| Joined: 25 Nov 2011 |
| Total Posts: 214 |
|
|
| 05 Dec 2011 09:07 PM |
You realize that script, if it was correct, would be just like saying: script.Parent.BrickColor = BrickColor.random()
I'm suggesting you want a loop, soo.
while (wait(.5)) do script.Parent.BrickColor = BrickColor.random() end |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 05 Dec 2011 09:09 PM |
@beauu
I think he was trying to put a loop...He just said if... |
|
|
| Report Abuse |
|
|
Beauu
|
  |
| Joined: 25 Nov 2011 |
| Total Posts: 214 |
|
|
| 05 Dec 2011 09:11 PM |
@miz That's why I made a loop. As far as I can see this forum has no common reading decency. =.= |
|
|
| Report Abuse |
|
|
TwoBoo
|
  |
| Joined: 08 Feb 2011 |
| Total Posts: 10790 |
|
|
| 05 Dec 2011 09:17 PM |
colors = {"Bright red", "Navy blue", "Bright green", "Magenta", "Dark blue"}
while true do script.Parent.BrickColor = BrickColor.new(colors[math.random(#colors)]) wait(0.5) end |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 05 Dec 2011 09:30 PM |
^
Easiler to just use BrickColor.random() |
|
|
| Report Abuse |
|
|
TwoBoo
|
  |
| Joined: 08 Feb 2011 |
| Total Posts: 10790 |
|
|
| 05 Dec 2011 09:36 PM |
^ You'll get grey colors too if you use .random(). |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 06 Dec 2011 03:11 PM |
Twoboo
It's easier if you just say BrickColor.random() instead of writing all the colors of the table and using math.random.. |
|
|
| Report Abuse |
|
|