How to scale a UI that's rotated

I want to make a UI transition like the one linked below. But when I try to change the size of a frame thats rotated the frame moves.

I have tried doing it with position instead of size. But that still messes it up since it’s using scale position.

So any ideas on how I do it?

Set the anchor point to 0.5, 0.5

This makes the frames anchor in the middle of the gui

That didnt work. It still moves

Hmm, mind sending the script and the properties of the frame?

And here is the script (This is the move script since that is the last thing I tried)

local speed = script.Parent.Parent.Settings.Speed

script.Parent.Parent.Activate.Changed:Connect(function()
	wait(.2)
	if script.Parent.Parent.Activate.Value == true then
		script.Parent:TweenPosition(UDim2.new(0.477, 0,1.59, 0),"InOut","Sine",speed.Value)

	else

		script.Parent:TweenPosition(UDim2.new(0.617, 0,0.496, 0),"InOut","Sine",speed.Value)
	end
end)

try this as the script

local TweenService = game:GetService("TweenService")

local Speed = script.Parent.Parent.Settings.Speed
local TweenData = TweenInfo.new(Speed.Value, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)

local function TweenFrame(Frame, NewSize)

    local Tween = TweenService:Create(Frame, TweenData, {Size = NewSize}):Play()

end

script.Parent.Parent.Activate.Changed:Connect(function()

    task.wait(0.2)

    if script.Parent.Parent.Activate.Value = true then

        TweenFrame(script.Parent, Udim2.new(0.477, 0, 0, 1.59, 0))

    else

        TweenFrame(script.Parent, Udim2.new(0.617, 0, 0.496, 0))


    end

end)

I don’t know if this will fix it but worth a try :slight_smile: