So, I have a simple script that tweens a GUI frame's background color. For some reason I get an error saying the tween was unable to be cast. Here's my script:
local TweenService = game:GetService("TweenService")
local LoadingScreenGui = script.Parent
local Background = LoadingScreenGui:WaitForChild("Background")
local TransitionTime = 1
function TweenObject(object,goal,t)
local tweenInfo = TweenInfo.new(1)
print(type(object),type(goal),type(tweenInfo))
local tween = TweenService:Create(object,goal,tweenInfo)
tween:Play()
end
local goal = {}
goal.BackgroundColor3 = Color3.new(1,1,1)
TweenObject(Background,goal,TransitionTime)
I could really use some help with this.

2 comments
You got your arguments incorrect on line 8. It should be like this: local tween = TweenService:Create(object,tweenInfo,goal)
Yep thanks