I look at roblox wiki scripting website to look for a proper tweening set up, But i get an error from output at line 20 about... Unable to cast to Dictionary
May someone help me what may i have done wrong?
local TweenService = game:GetService("TweenService")
local part = script.Parent
local mode = part.ColorsMode
local tweenInfo = TweenInfo.new(
2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
true,
0
)
local colorstable = {
['1'] = BrickColor.new('Really black'),
['2'] = BrickColor.new('Really red'),
['3'] = BrickColor.new('Really blue')
}
local tween = TweenService:Create(part,tweenInfo,mode,colorstable)
mode:GetPropertyChangedSignal('Value'):Connect(function()
part.BrickColor = colorstable[tostring(mode.Value)]
tween:Play()
end)