i found out what the problem was, instead of doing it for all the children, it picks a random one and does the script for that one only while all the others just stay on, if anyone can help that would be awesome

Script

local function light(materialone, materialtwo, lighting)
	for _, child in ipairs(script.Parent:GetChildren()) do
		child:FindFirstChild("one").Material = materialone
		child:FindFirstChild("two").Material = materialtwo
		child:FindFirstChild("loit").PointLight.Enabled = lighting
	end
end

while task.wait() do
	print("a")
	wait(math.random(10,14))
	print("b")
	light(Enum.Material.SmoothPlastic, Enum.Material.SmoothPlastic, false)
	wait(.2)
	print("c")
	light(Enum.Material.Neon, Enum.Material.Neon, true)
	wait(.2)
	print("d")
	light(Enum.Material.SmoothPlastic, Enum.Material.SmoothPlastic, false)
	wait(.2)
	print("e")
	light(Enum.Material.Neon, Enum.Material.Neon, true)
	wait(.2)
	print("f")
	light(Enum.Material.SmoothPlastic, Enum.Material.SmoothPlastic, false)
	wait(math.random(10,14))
	print("g")
	light(Enum.Material.Neon, Enum.Material.Neon, true)
end 


4 comments

1

either put [SOLVED] in title or remove it

0

it broke lol

1

uhh are you sure you waited for 10-14 seconds?

0

i waited around a minute but nothing happened