Getting error 'Unable to cast Instance to TweenInfo' when Tweening Gui

I am getting the error in the title and am not sure why
It’s occurring on line 25 when I tween the size

local container = script.Parent.Container
local intro = script.Parent.Intro
local pivot = script.Parent.Pivot
local ts = game:GetService('TweenService')

intro.Visible = true
container.Visible = true

local ti = TweenInfo.new(1,Enum.EasingStyle.Exponential,Enum.EasingDirection.Out)
task.wait(5)
ts:Create(intro.Image,ti,{ImageTransparency = 0}):Play()
task.wait(1.5)
intro.Text.Visible = true
ts:Create(intro.Image,ti,{AnchorPoint = Vector2.new(0,.5)}):Play()
ts:Create(intro.Text,ti,{Size = UDim2.fromScale(.5,1)}):Play()
task.wait(1.5)
ts:Create(intro.Image,ti,{AnchorPoint = Vector2.new(.5,.5)}):Play()
ts:Create(intro.Text,ti,{Size = UDim2.fromScale(.625,1)}):Play()
task.wait(1.5)
ti = TweenInfo.new(2,Enum.EasingStyle.Exponential,Enum.EasingDirection.InOut,0,false,0)
intro.Text.Visible = false
intro.Image.BackgroundTransparency = 1
ts:Create(intro,ti,{BackgroundTransparency = 1}):Play()
ts:Create(intro.Image,ti,{Position = UDim2.fromOffset(28.68,31.16)}):Play()
ts:Create(intro.Image,ti,{AnchorPoint = Vector2.new(0,0)}):Play()
ts:Create(intro.Image,ts,{Size = UDim2.new(0.4,0,0.3,0)}):Play()

It shouldn’t be happening but it is…

Nvm… I see the problem…
I put ts instead of ti ;-;

Yeah, you have a typo on line 26.

When you solve your own problem, please make sure to reply to your original post with your solution and mark it as the solution :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.