Unable to cast UDim2 to token Error

This is my code:

script.Parent.Label.MouseButton1Click:Connect(function()
	script.Parent:TweenSizeAndPosition(UDim2.new(0.149, 0, 0.373,0), UDim2.new(0.91,0,0.79,0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, 2)
	script.Parent.Label:TweenPosition(UDim2.new(0.836, 0, 0.152,0), UDim2.new(0.082,0,0.03,0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, 2)
	wait(2)
	script.Parent.line.Visible = true
	script.Parent.options.Visible = true
end)

It returns Unable to cast UDim2 to token on line 3, which is the second tween.

For TweenPosition, you have 2 UDim2 values. For either a TweenSizs or TweenPosition you should only put one.

2 Likes

Oops typo there. Meant to make the second one size and position.