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
COMMUNITY QUESTION
Output comes up with "in 'pairs'(table expected, got nil)" What is wrong?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
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.
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.