I want to make the lights to have dimming effects, but because that this is a loop command, it actually loops the “dimming” too, causing some kind of seizure effects, any alternatives?
^ Dimming effect, as if the halogen lights that were used at the Dubai Fountain.
local MinIndex = 1
local MaxIndex = 84 -- MODIFY to the max number exemple here Mini17 the 17
local CurrentIn = 0
local Path = game.Workspace.Minis.Ring4
for current = MinIndex, MaxIndex do
CurrentIn = CurrentIn + 1
local Names = "Mini000"
if CurrentIn < 10 then
Names = "Mini00"..CurrentIn
else
Names = "Mini0"..CurrentIn
end
local lights = Path[Names].lights
local water = Path[Names].Main.Nozzle.Water
local refill = Path[Names].Main.Nozzle.Refill
water:GetPropertyChangedSignal("Enabled"):Connect(function()
for _, bulb in ipairs(lights:GetChildren()) do
bulb.light.Brightness = 0
bulb.light.Enabled = true
bulb.Material = "Neon"
end
task.wait(.2)
for _, bulb in ipairs(lights:GetChildren()) do
bulb.light.Brightness = .1
end
task.wait(.2)
for _, bulb in ipairs(lights:GetChildren()) do
bulb.light.Brightness = .3
end
task.wait(.2)
for _, bulb in ipairs(lights:GetChildren()) do
bulb.light.Brightness = .5
end
task.wait(.2)
for _, bulb in ipairs(lights:GetChildren()) do
bulb.light.Brightness = .7
end
task.wait(.2)
for _, bulb in ipairs(lights:GetChildren()) do
bulb.light.Brightness = 1
end
end)
refill:GetPropertyChangedSignal("Enabled"):Connect(function()
for _, bulb in ipairs(lights:GetChildren()) do
bulb.light.Brightness = 1
end
task.wait(.2)
for _, bulb in ipairs(lights:GetChildren()) do
bulb.light.Brightness = .7
end
task.wait(.2)
for _, bulb in ipairs(lights:GetChildren()) do
bulb.light.Brightness = .5
end
task.wait(.2)
for _, bulb in ipairs(lights:GetChildren()) do
bulb.light.Brightness = .3
end
task.wait(.2)
for _, bulb in ipairs(lights:GetChildren()) do
bulb.light.Brightness = .1
end
task.wait(.2)
for _, bulb in ipairs(lights:GetChildren()) do
bulb.light.Enabled = false
bulb.Material = "Glass"
end
end)
end