Is there a way in which I can change the color correction effect smoothly in a script?
What do you mean by change? are you referring to a property of the ColorCorrectionEffect instance? If so then you can use TweenService to smoothly change the value. Basically, it allows you to smoothly change the value of an instance with configurable animation time, type of animation(linear, quadratic, etc) , if the animation should reverse(aka play backwards after finishing), if it should loop and how many times, etc.
Sorry, I was referring to enabling it smoothly, or at least not have it just turn off and on instantly
I think youre refering to enabling a property like a “Mix” slider slowly, unfortunately there is no property that can fix that, instead use lerping and tweening to slowly fade in the different values
Well, it’s not possible to tween a bool value since there’re only two possible states(zero and one), however, you can instead set the start values of the correction instance to something that makes zero difference for the game graphics and slowly tween/animate the values that can be tweened(number values like saturation, contrast, etc.) towards the state you try to achieve.
If it’ specifically for enabling or disabling, before setting enabled, tween to or from white. If there’s other properties, tween them too.
local cceffect = script.Parent
local white = Color3.new(1, 1, 1)
local color = Color3.fromHex("#00ff00")
local saturation = 0.3
local TweenService = game:GetService("TweenService")
local tweenin = TweenService:Create(cceffect, TweenInfo.new(1), {Saturation = saturation, Tint = color})
local tweenout = TweenService:Create(cceffect, TweenInfo.new(1), {Saturation = 0, Tint = white})
tweenin:Play() --enablr
tweenout:Play() --disablr
I was interrupted during typing this lol, meaning i go from first post to last post