Help with tweening a part's color

I’m trying to make a tween that moves a part and changes its color, but it’s giving me the error “Unable to cast dictionary”
here’s the script:

local part = script.Parent
local TweenService = game:GetService("TweenService")
local info = TweenInfo.new(5,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,true,0)
local goals = {Size =Vector3.new(29,.5,2), Position = part.Parent.WallFwall.Position,Color3.fromRGB(0, 255, 0)}
local tween = TweenService:Create(part,info,goals) -- this is where the error message takes me when I click it 

thanks

I believe you meant to do:

local goals = {
   Size =Vector3.new(29,.5,2), 
   Position = part.Parent.WallFwall.Position,
   Color = Color3.fromRGB(0, 255, 0)
}
2 Likes