one = {script.Parent.One:GetChildren()}
two = {script.Parent.Two:GetChildren()}
three = {script.Parent.Three:GetChildren()}
four = {script.Parent.Four:GetChildren()}
five = {script.Parent.Five:GetChildren()}

function Blue()	
	for i,v in pairs(p) do
		v.BrickColor = BrickColor.new("Electric blue")
	end
end

function Green()	
	for i,v in pairs(p) do
		v.BrickColor = BrickColor.new("Lime green")
	end
end

function Yellow()	
	for i,v in pairs(p) do
		v.BrickColor = BrickColor.new("New Yeller")
	end
end

function Red()	
	for i,v in pairs(p) do
		v.BrickColor = BrickColor.new("Really red")
	end
end

function Black()	
	for i,v in pairs(p) do
		v.BrickColor = BrickColor.new("Black")
	end
end

while true do
    local p = one
	Blue()
	wait(0.25)
	Green()
	wait(0.25)
	Yellow()
	wait(0.25)
	Red()
	wait(0.25)
	Black()
	wait(0.5)
end

while true do
	local p = two
	Green()
	wait(0.25)
	Yellow()
	wait(0.25)
	Red()
	wait(0.25)
	Black()
	wait(0.25)
	Blue()
	wait(0.5)
end

while true do
	local p = three
	Yellow()
	wait(0.25)
	Red()
	wait(0.25)
	Black()
	wait(0.25)
	Blue()
	wait(0.25)
	Green()
	wait(0.5)
end

while true do
	local p = four
	Red()
	wait(0.25)
	Black()
	wait(0.25)
	Blue()
	wait(0.25)
	Green()
	wait(0.25)
	Yellow()
	wait(0.5)
end

while true do
	local p = five
	Black()()
	wait(0.25)
	Blue()
	wait(0.25)
	Green()
	wait(0.25)
	Yellow()
	wait(0.25)
	Red()
	wait(0.5)
end

2 comments

0

First of all, please format your code. Second, please give us more details on your question. We can't completely understand all this code just from the title. So give us more details.

0

There is this thing you click, it has the picture of Lua logo, it wil generate a field where you can paste your code so it looks better, use that please.