It does fade in but it won't fade out later on.

local color = game.Lighting.ColorCorrection

local db = true
local player = game.Players.LocalPlayer
local target = game.Workspace.Lobby.LobbyPoint
local delay = 3
script.Parent.MouseButton1Click:connect(function()
 if db == true then
  db = false
    for i = 0,1,0.025 do
        wait()
        color.Brightness = i
    end
    wait(1)
  player.Character.HumanoidRootPart.CFrame = target.CFrame * CFrame.new(0,3,0)
    wait(1)
    for i = 1,0,-0.025 do -- From here
        wait()
        color.Brightness = i
    end
    script.Parent.Parent.Visible = false
  for i = delay, 1, -1 do
   script.Parent.Text = i
   wait(1)
  end
  script.Parent.Text = "Continue"
  db = true
 end
end)

4 comments

0

You're telling it to set the brightness to 0 immediately, so you should change it to a decimal or something similar.

0

Doesn't work

0

You must have a different problem from what you think it is. I isolated the section of the code that fades the ColorCorrection effect out and in, and tested it in my own place and it works perfectly. It's likely that the game cannot find 'target' or the 'player' for whatever reason. Do you get any error messages when you run it?

0

Apparently no, all it does is not fade out but just fades in for some reason and also when I put in print() on both of them, only the fading in works.