**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!
COMMUNITY QUESTION
How to make after a certain amount of time a lighting variable will be enabled?
1 answer
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
This discussion is preserved as it was. New answers, comments, and votes are closed.

7 comments
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)
i want it to toggle after like 90000 seconds and then turn off after like 10 seconds. and yeah for everyone.
what the heck, 90000 seconds is 25 hours, u good?
lol yeah, its a really long waiting game
https://www.youtube.com/watch?v=VqUchwZDoLM check this?
anyways, heres a solution: wait(90000) game.Lighting.ColorCorrection.Enabled = true wait(10) game.Lighting.ColorCorrection.Enabled = false lmao
wow. i feel stupid now