ValuizeJoin Date: 2012-11-04 Post Count: 15531 |
with changing colors
|
|
|
while wait(.79874939508393) do
for i,v in next, dancefloor:GetChildren() do
v.Color = Color3.new(math.random(), math.random(), math.random())
end
end
|
|
ValuizeJoin Date: 2012-11-04 Post Count: 15531 |
Where do I put this sript?
|
|
caca50Join Date: 2011-07-10 Post Count: 2037 |
Several different ways.
I'd suggest making the floor with several parts, and randomly changing the color of each "tile"
Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil) |
|
doggy00Join Date: 2011-01-11 Post Count: 3571 |
Put this in a script which is in a model with all the disco floor parts:
discoparts = 9 --how many tiles are changing colors in the model?
repeat floor = script.Parent:GetChildren() wait() until #floor == discoparts + 1
timeuntilchanges = .8 --time until the floor changes colors again
while wait(timeuntilchanges) do
for i,v in pairs(floor) do
if v:IsA("BasePart") then
v.BrickColor = BrickColor.Random()
end
end
end |
|
ValuizeJoin Date: 2012-11-04 Post Count: 15531 |
How to make it so only certain colors are allound?
|
|
ImVortexeJoin Date: 2013-01-26 Post Count: 1149 |
colors = {"Really Red"}--colors here
for i =1,#colors do
pick = colors[math.random(1,#colors)]
while true do
script.Parent.BrickColor = BrickColor.new(pick)
wait(0.25)--time until next color picked
end
end
|
|
doggy00Join Date: 2011-01-11 Post Count: 3571 |
That's a bit harder and more lengthy, but here:
math.randomseed(tick()%1*1e6)
allowedcolors = {"Really red","Bright blue",24,9,"Cool yellow"}
currentcolor = nil
--for allowed colors, fill in the name of the color and put quotation marks
--you can also use numbers if you know the color codes, which i will link to at the very end
--regardless, the table would naturally be a very long one but don't let that bother you
discoparts = 9 --how many tiles are changing colors in the model?
repeat floor = script.Parent:GetChildren() wait() until #floor == discoparts + 1
timeuntilchanges = .8 --time until the floor changes colors again
while wait(timeuntilchanges) do
for i,v in pairs(floor) do
if v:IsA("BasePart") then
n = math.random(1,#allowedcolors)
for a,b in pairs(allowedcolors) do
if a == n then
currentcolor = b
end
end
v.BrickColor = BrickColor.new(currentcolor)
end
end
end
--link to color codes and names: http://wiki.roblox.com/index.php?title=BrickColor_codes |
|
|
@ImVortexe this only changes the color once, you forgot to put the color picker in the while loop. |
|