|
I'm need help making a script that chages the color of a brick (in a way like a dance floor brick) from Reddish brown, Bright blue, Bright yellow, Earth green, and Bright red. However, I need it to be randomized. |
|
Bannana97Join Date: 2008-06-22 Post Count: 10215 |
Put a script with this inside of the brick:
while true do
wait()
script.Parent.BrickColor = BrickColor.random()
end |
|
|
I need the randomized colors Reddish brown, Bright blue, Bright yellow, Bright red, and Earth green only. |
|
|
clolors = {"Reddish brown", "Bright Blue", "Bright yellow", "Bright red", "Earth green"}
math.randomseed(tick())
while true do
c = math.random(1, #colors)
wait()
script.Parent.BrickColor = c
end |
|
|
Didn't work.............................. :\ |
|
|
|
"Workspace.Part.Script:4: attempt to get length of global 'colors' (a nil value)" |
|
|
colors= {"Reddish brown", "Bright Blue", "Bright yellow", "Bright red", "Earth green"}
math.randomseed(tick())
while true do
c = math.random(1, #)
wait()
script.Parent.BrickColor = c
end
Lol had a spelling error, try now. |
|
|
colors= {"Reddish brown", "Bright Blue", "Bright yellow", "Bright red", "Earth green"}
math.randomseed(tick())
while true do
c = math.random(1, #colors)
wait()
script.Parent.BrickColor = c
end
Whoops made another error, use this one! |
|
|
Script:
"colors = {"Reddish brown", "Bright Blue", "Bright yellow", "Bright red", "Earth green"}
math.randomseed(tick())
while true do
c = math.random(1, #colors)
wait()
script.Parent.BrickColor = c
end"
Output:
"Workspace.Part.Script:6: bad argument #3 to '?' (BrickColor expected, got number)" |
|
|
colors = {"Reddish brown", "Bright Blue", "Bright yellow", "Bright red", "Earth green"}
math.randomseed(tick())
while true do
c = math.random(1, #colors)
wait()
script.Parent.BrickColor = BrickColor.new(c)
end |
|
|
This script works, but it only switches to the colors "Brick yellow", a couple different forms of grey, and maybe some others. |
|
|
ok, so what other colors do you want? Just add them to the tanle with all the other colors. |
|
|
Is it not "Bright blue"?
† KMXD † |
|
|
@knightmarexd
Ahh right, mished that, here use this new script, and see if it does all the colors.
colors = {"Reddish brown", "Bright blue", "Bright yellow", "Bright red", "Earth green"}
math.randomseed(tick())
while true do
c = math.random(1, #colors)
wait()
script.Parent.BrickColor = BrickColor.new(c)
end |
|
|
That's what I already had.. Doesn't work... |
|
|
I tried using this script and it worked, all the colors.
colors = {"Reddish brown", "Bright blue", "Bright yellow", "Bright red", "Earth green"}
math.randomseed(tick())
while true do
c = math.random(1, #colors)
wait()
script.Parent.BrickColor = BrickColor.new(c)
end |
|
|
Just tried that one. The script changes the colors, but not the ones I want. |
|
|
ok so, what colors do you want? |
|
|
Reddish brown, Bright blue, Bright yellow, Earth green, and Bright red. |
|
|
Those are the colors that it currently would be doing. |
|
|
I don't know what the problem is... The script works, but it does not change to the colors that are specified. It only changes to Brick yellow, and some others. |
|
|
colors = {"Reddish brown", "Bright blue", "Bright yellow", "Bright red", "Earth green"}
math.randomseed(tick())
while true do
c = colors[math.random(1, #colors)]
wait(1)
script.Parent.BrickColor = BrickColor.new(c)
end
That does exactly what you want. |
|
|
THNAK YOU SO MUCH!!! That one worked!! |
|
|