local function Blackout()
if BlackoutBool == false then
BlackoutBool = true
Generator.PowerDown:Play()
for i, v in pairs(game.Workspace:GetDescendants()) do
if v:IsA("PointLight") or v:IsA("SpotLight") or v:IsA("SurfaceLight") or v:IsA("") then -- here!!!
if v.Name ~= "Ignore" then
spawn(function ()
v.Enabled = false
wait(.075)
v.Enabled = true
wait(.075)
v.Enabled = false
wait(.075)
v.Enabled = true
wait(.075)
v.Enabled = false
end)
end
end
end`
This should work if you’ve got pointlights in the neon parts. You could change the class to another light type that you’re using.
local function Blackout()
if BlackoutBool == false then
BlackoutBool = true
Generator.PowerDown:Play()
for i, v in pairs(game.Workspace:GetDescendants()) do
if v:IsA("MeshPart") or v:IsA("Part") and v.Material == "Neon" then -- here!!!
if v.Name ~= "Ignore" then
spawn(function ()
local light = v:FindFirstChildOfClass("PointLight")
v.Material = "Metal"
light.Enabled = false
wait(.075)
light.Enabled = true
v.Material = "Neon"
wait(.075)
light.Enabled = false
v.Material = "Metal"
wait(.075)
light.Enabled = true
v.Material = "Neon"
wait(.075)
light.Enabled = false
v.Material = "Metal"
end)
end
end
end
local function Blackout()
if BlackoutBool == false then
BlackoutBool = true
Generator.PowerDown:Play()
for i, v in pairs(game.Workspace:GetDescendants()) do
if v:IsA("MeshPart") or v:IsA("Part") and v.Material == "Neon" then -- here!!!
if v.Name ~= "Ignore" then
spawn(function ()
local light = v:FindFirstChildOfClass("SpotLight") or v:FindFirstChildOfClass("SurfaceLight")
v.Material = "Metal"
light.Enabled = false
wait(.075)
light.Enabled = true
v.Material = "Neon"
wait(.075)
light.Enabled = false
v.Material = "Metal"
wait(.075)
light.Enabled = true
v.Material = "Neon"
wait(.075)
light.Enabled = false
v.Material = "Metal"
end)
end
end
end
local function Blackout()
if BlackoutBool == false then
BlackoutBool = true
Generator.PowerDown:Play()
for i, v in pairs(game.Workspace:GetDescendants()) do
if v:IsA("MeshPart") or v:IsA("Part") and v.Material == "Neon" then -- here!!!
if v.Name ~= "Ignore" then
spawn(function ()
local light = v:FindFirstChildOfClass("SpotLight") or v:FindFirstChildOfClass("SurfaceLight") if light then
v.Material = "Metal"
light.Enabled = false
wait(.075)
light.Enabled = true
v.Material = "Neon"
wait(.075)
light.Enabled = false
v.Material = "Metal"
wait(.075)
light.Enabled = true
v.Material = "Neon"
wait(.075)
light.Enabled = false
v.Material = "Metal"
end)
end
end
end
local function Blackout()
if BlackoutBool == false then
BlackoutBool = true
Generator.PowerDown:Play()
for _, Descendant in ipairs(game.Workspace:GetDescendants()) do
if Descendant.Parent.Material == Enum.Material.Neon and Descendant:IsA("PointLight") or Descendant:IsA("SpotLight") or Descendant:IsA("SurfaceLight") then -- here!!!
if Descendant.Name ~= "Ignore" then
local Parent = Descendant.Parent
coroutine.wrap(function()
for i = 1, 5 do
wait(.075)
Descendant.Enabled = not Descendant.Enabled
Parent.Material = Enum.Material.Metal
end
end)()
end
end
end
end
end