Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make a disco tile?

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?

1 comment

0

There is a wiki article on this.

1 answer

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

1 comment

0

Thanks. It works.

This discussion is preserved as it was. New answers, comments, and votes are closed.