Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Won't let the ColorCorrection fade out?

Asked by
fr2013 88
5 years ago
Edited 5 years ago

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)
0
You're telling it to set the brightness to 0 immediately, so you should change it to a decimal or something similar. CaptainAlien132 225 — 5y
0
Doesn't work fr2013 88 — 5y
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? ChiefWildin 295 — 5y
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.  fr2013 88 — 5y

Answer this question