Hi! So, uh; this script do a tween in a ColorCorrectionEffect
, but, I every time get Unable to cast value to Object
in Output.
This LocalScript are in StarterGui
local light = game.Lighting.ColorCorrection
local highlight = game.Players.LocalPlayer.Character:WaitForChild("Highlight")
local tween = game:GetService("TweenService")
local lightgoal_start = { Saturation = -1 }
local lightgoal_end = { Saturation = 0 }
function Damage()
local info = TweenInfo.new(.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0)
light = lightgoal_start
highlight.Enabled = true
wait(.1)
tween:Create(light, info, lightgoal_end):Play()
highlight.Enabled = false
end
damageevent.OnClientEvent:Connect(Damage)