1

# How to make after a certain amount of time a lighting variable will be enabled?

**The title kinda explains itself. I want it so that after a certain amount of time a color correction effect will be enabled for a couple secs. I'm also very new to scripting so it would be awesome if y'all could explain it to me and show me, thanks!

0
do you mean you want it to toggle once after x amount of time or continously forever, also if you want it to be for everyone or specific player(s) enzotinman1 22 — 3d
1
i want it to toggle after like 90000 seconds and then turn off after like 10 seconds. and yeah for everyone. Ey_Yatzy 6 — 3d
1
what the heck, 90000 seconds is 25 hours, u good? greatneil80 2465 — 3d
0
lol yeah, its a really long waiting game Ey_Yatzy 6 — 3d
0
anyways, heres a solution: wait(90000) game.Lighting.ColorCorrection.Enabled = true wait(10) game.Lighting.ColorCorrection.Enabled = false lmao greatneil80 2465 — 3d
0
wow. i feel stupid now Ey_Yatzy 6 — 2d

0
xxaxxaz 38
3 days ago
Edited 3 days ago

script:

local part = script.Parent -- replace that with the location of the part
local time = 1 -- replace 1 with the amount of time in between
local sheep = false

local Color1 = Red -- replace red with what color you want it to change back to
local Color2 = Blue -- replace red with what color you want it to change to

while wait(time) do
sheep = not sheep
if sheep == true
part.BrickColor = Enum.BrickColor[Color1]
else
part.BrickColor = Enum.BrickColor[Color2]
end
end


another way script:

local part = script.Parent -- replace that with the location of the part
local time1 = 1 -- replace 1 with the amount of time in between
local time2 = 1 --replace 1 with the amount of time in between
local sheep = false

local Color1 = Red -- replace red with what color you want it to change back to
local Color2 = Blue -- replace red with what color you want it to change to

while wait()
if sheep = true
wait(time1)
sheep = true
part.BrickColor = Enum.BrickColor[Color1]
else
wait(time2)
sheep = false
part.BrickColor = Enum.BrickColor[Color1]
end
end