Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a disco tile?

Asked by 10 years ago

I want to know how to make a brick that change color every 10 seconds, like a disco floor. Is it~~~~~~~~~~~~~~~~~ Workspace.Brick.Properties.BrickColor=Cyan wait (10) Workspace.Brick.Properties.BrickColor=Green ~~~~~~~~~~~~~~~~~ Or is there another way?

0
There is a wiki article on this. PiggyJingles 358 — 10y

1 answer

Log in to vote
1
Answered by 10 years ago
while wait(10) do --Every 10 seconds
    Workspace.Part.BrickColor = BrickColor.Random() --Change the colour of said part to a random colour.
end

If you had an entire model of parts that you wanted to change the colour of, use the following:

local model = Workspace.Model
while wait(10) do
    for i,v in pairs(model:GetChildren()) do --For every child of model
        v.BrickColor = BrickColor.Random() --Change the child's colour to a random colour.
    end
end
0
Thanks. It works. Ryuxakuta 15 — 9y
Ad

Answer this question