I want to tweensize properly

Hello. I am currently trying to create a Tween for a TextLabel that starts from the center of the screen and gradually grows until it covers the entire screen. Therefore, I set the Size and Position Scale of the TextLabel when it covers the entire screen as the goal of the Tween. However, when I run the program, the TextLabel grows larger but is skewed to the right. I want to use TweenService’s Tween
() to move the TextLabel. What should I do?

local Event = game.ReplicatedStorage.RemoteEvents.Question.GiveQuestion
local TweenService = game:GetService("TweenService")

Event.OnClientEvent:Connect(function()
	
		
		local Question =  game.ReplicatedStorage.GlobalValues.Question
		local Answer = game.ReplicatedStorage.GlobalValues.Answer
		
		local Tween = TweenService:Create(script.Parent.Question,TweenInfo.new(31), {Size = UDim2.new(1, 0,0.189, 0)}, {Position = UDim2.new(0, 0,0, 0)})
		
		Tween:Play()
		
	
end)

2 Likes

set the AnchorPoint of the ui to 0.5, 0.5 and the Position to 0.5, 0, 0.5, 0

1 Like

WOW it works! thank you very much for information :>

2 Likes

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