Scripting novice here. Trying to make the screen go white with the color correction effect in lighting (since it looks nicer than a white frame turning opaque). Since this effect doesn't cover up the GUI, I wanted all the text on the screen to simply fade out when the button is clicked. This doesn't happen though, and only the screen goes white while the rest stays the same. Any idea how to fix it?
s = game:GetService("TeleportService")
id = 186379525
local cc = game.Lighting.ColorCorrection
local logo = game.StarterGui.logo.ImageLabel
local tut = game.StarterGui.tutorial.TUTORIAL
local change = game.StarterGui.changelog.Play
local cred = game.StarterGui.credits.Play
local play = game.StarterGui.play.Play
function onClicked()
for i = 0.02,1.5,0.05 do
cc.Brightness = i
cred.TextTransparency = i
tut.TextTransparency = i
play.TextTransparency = i
change.TextTransparency = i
logo.ImageTransparency = i
wait(0.01)
end
s:Teleport(id)
end
script.Parent.MouseButton1Click:connect(onClicked)
