Lighting Tween Problem

Alright so, I was going about scripting a somewhat simple lighting system using parts to trigger various RemoveEvents which trigger lighting tweens, fairly self-explanatory, yes? So in the process of making it I was using Lighting.Ambient to change the lighting, since Ambient is the main lighting feature I was using. However, while assigning the values for the tweens, I keep receiving the error:
’ Unable to cast to Dictionary’
I’m not sure what this means nor how to fix it, I’m very stuck here lol.

The code I am using to assign the values of one of the tweens is below, as well as the necessary variables present.

local TweenS = game:GetService("TweenService")
local Lighting = game.Lighting
local LightingAmbient = Lighting.Ambient

local LightingAmbientTweenInf1 = TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)

local LightingAmbientFinish1 = Color3.new(116, 92, 67)

local LightingAmbientTween1 = TweenS:Create(LightingAmbient, LightingAmbientTweenInf1, LightingAmbientFinish1)

So, how would I go about fixing this?

honestly this is probably an easy fix and I’m just being stupid

I attempted to add the braces onto the line
local LightingAmbientFinish1 = {Color3.new(116, 92, 67)}
but it didn’t change anything unfortunately

Should be:

local LightingAmbientFinish1 = {Ambient = Color3.fromRGB(116, 92, 67)}
2 Likes

Yep that’s fixed it, thanks for your help.