Weird movement with gui text

Hi guys! I’m fairly new to coding and have come up with a visual issue with my gui text.
The text kinda squeezes in on itself when the gui is opening, the thing is, it only happens after opening the gui for the first time. Any time I open the gui after that, it acts normally.
I want to the text to move without squeezing in on itself, moving smoothly while also increasing size.
I’ve provided the code for the credits button, all other buttons have the same script.
I’ve also provided a video to show the glitch.
(If it’s any helpful, the text has TextScaled turned on)

local credits = script.Parent.Parent.Parent.CreditsScreen

script.Parent.MouseButton1Up:Connect(function()
	credits.Visible = true
	credits.UrDog.Visible = true
	credits.BuildToDream.Visible = true
	credits.Close.Visible = true
	credits:TweenSize(UDim2.new(0.55, 0, 0.55, 0),"Out", "Sine", .75)
	credits:TweenPosition(UDim2.new(0.223, 0, 0.224, 0),"Out", "Sine", .75)
	credits.Title:TweenSizeAndPosition(UDim2.new(.293, 0, .128, 0), UDim2.new(.355, 0, 0, 0),"Out", "Sine", .65)
	task.wait(.45)
	credits.Line.Visible = true
	credits.Line:TweenSizeAndPosition(UDim2.new(.75, 0, .01, 0), UDim2.new(.124, 0, .125, 0),"InOut", "Sine", .6)
end)

I am not 100% sure but this might be the reason.

Instead of tweening the size and position alone at first and then tweening both using TweenSizeAndPosition, find a way to just tween it with TweenSizeAndPosition.

Tell me if I am wrong.

It didn’t work, the text is still squeezing, did you mean like this?

	credits:TweenSizeAndPosition(UDim2.new(0.55, 0, 0.55, 0), UDim2.new(0.223, 0, 0.224, 0),"Out", "Sine", .75)
	credits.Title:TweenSizeAndPosition(UDim2.new(.293, 0, .128, 0), UDim2.new(.355, 0, 0, 0),"Out", "Sine", .65)

I am not expert in UDim2’s but you can try other types of Enum.EasingStyle’s
TweenSizeAndPosition is a bit buggy (no idea why but i feel it.) to Guis i prefer use TweenService.

And another note: Tweens go for the “quickest” and “easiest” method for them

How did this not error?

Replace all “Out” and “Sine” strings with Enum.EasingDirection.Out and Enum.EasingStyle.Sine.

Edit: Replace “InOut” with Enum.EasingDirection.InOut

So after tweaking a bit with my code and taking in the suggestions, I got both scripts to still not smoothly move the text as I wanted to.

Original Script

local credits = script.Parent.Parent.CreditsScreen

script.Parent.MouseButton1Up:Connect(function()
	credits.Visible = true
	credits.UrDog.Visible = true
	credits.BuildToDream.Visible = true
	credits.Close.Visible = true
	credits:TweenSizeAndPosition(UDim2.new(0.55, 0, 0.55, 0), UDim2.new(0.223, 0, 0.224, 0),Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .75)
	credits.Title:TweenSizeAndPosition(UDim2.new(.293, 0, .128, 0), UDim2.new(.355, 0, 0, 0),Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .65)
	task.wait(.45)
	credits.Line.Visible = true
	credits.Line:TweenSizeAndPosition(UDim2.new(.75, 0, .01, 0), UDim2.new(.124, 0, .125, 0),Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .6)
end)

TweenService Script

local credits = script.Parent.Parent.CreditsScreen
local TweenService = game:GetService("TweenService")

script.Parent.MouseButton1Up:Connect(function()
	credits.Visible = true
	
	local goal = {}
	goal.Size = UDim2.new(.293, 0, .128, 0)
	goal.Position = UDim2.new(.355, 0, 0, 0)
	
	local goalparent = {}
	goalparent.Size = UDim2.new(0.55, 0, 0.55, 0)
	goalparent.Position = UDim2.new(0.223, 0, 0.224, 0)

	local tweenInfo = TweenInfo.new(.65)

	local tween = TweenService:Create(credits.Title, tweenInfo, goal)
	local parent = TweenService:Create(credits, tweenInfo, goalparent)
	tween:Play()
	parent:Play()
end)