You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I would need the ColorCorrection to have a rainbow tint that changes colors (with tweenservice) -
What is the issue? Include screenshots / videos if possible!
There’s an issue with the current rainbow script that I use for most of my building parts, it somehow doesn’t work for “colorcorrection”, I am sure that it should be the “tintcolor” that I’m supposed to cast the value on, but for some reason it says “unable to cast value to object”
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried removing the whole “colortint” and direct the tween to “game.workspace.colorcorrection” and also instead of using “color.fromrgb” to others, but it just doesn’t seem to work at all
I did look for "unable to cast value to object or anything related to “ColorCorrection rainbow” (I’m quite straightforward when I look for these things lol), but nothing seems to help
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local TS = game:GetService('TweenService')
local Colors = {{255, 125, 0}, {255, 255, 0}, {125, 255, 0}, {0, 255, 0}, {0, 255, 125}, {0, 255, 255}, {0, 125, 255}, {0, 0, 255}, {125, 0, 255}, {255, 0, 255}, {255, 0, 125}}
local tweenInfo = TweenInfo.new(
5,
Enum.EasingStyle.Linear,
Enum.EasingDirection.In
)
local function initiateColorChange(part)
while true do
wait()
for i = 1, #Colors do
local NextColor = TS:Create(part, tweenInfo, {Color = Color3.fromRGB(unpack(Colors[i]))})
NextColor:Play()
NextColor.Completed:Wait()
end
end
end
if true then
local ColorTint = game.Lighting.ColorCorrection.TintColor
initiateColorChange(ColorTint)
wait()
end