#How can I script a disco floor with one script?

1 messages · Page 1 of 1 (latest)

thick agate
#

I'm very new to scripting, but how can I use one script to change the colors for every part in the folder for a disco floor? I tried this but it failed

delicate ibex
craggy egret
#

Make a table with RGB values for the colors you want and use a for loop to change each part's color to a random color from the table

thick agate
#

thank u thank u

#

I’ll try it

worldly condor
#

oh wait u did

#
for I,V in pairs(Tiles:GetChildren()) do
  Tiles.BrickColor = BrickColor.Random()
end
past hedge
#
while true do
for each, tile in ipairs(workspace["Disco floor"] :GetChildren() do
tile.BrickColor) = BrickColor.Random()
end
task.wait(1)
end
#

@thick agate

delicate ibex
past hedge
craggy egret
#

Ipairs use more space

#

Or smth

#

Idk i dont write code

delicate ibex
#

Theres no need to use ipairs, just ‘in ______’ and whatever ur looping

past hedge
#

Oh ok I learned to use ipairs when the key is number and pairs when the key is a key value

thick agate
#

I'm confused