Issue with animations and scaling of a UI

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? I want to achieve that the contents inside scale up with the image as well, so they don’t just remain where they are, it looks kinda weird.

  2. What is the issue? The issue is shown in this video:
    zbKSPR1

  3. What solutions have you tried so far? I have tried to look places to solve this problem, but it is no where to find. Maybe I am bad at looking.

GUI scales, but content inside just stays how it normally is.

1 Like

you are in #help-and-feedback:scripting-support so im assuming that a script is the problem
can you send the script?
also is everything using scale and not offset?

1 Like

This is the script.

function animations.Size(frame)

	local info = {}
	info.TweenInfo = TweenInfo.new(
		Shape_Settings.length,
		Shape_Settings.EasingStyle,
		Shape_Settings.EasingDirection,
		0,
		true,
		0
	)

	info.ShapeSize = UDim2.new(frame.Size.X.Scale,frame.Size.X.Scale, frame.Size.Y.Scale,frame.Size.Y.Scale*Shape_Settings.Size)
	info.ShapeTween = TweenService:Create(frame, info.TweenInfo, {Size = info.ShapeSize})
	info.ShapeTween:Play()

end
1 Like

The problem is likely coming from the fact that you’re adjusting the offset property when you do

info.ShapeSize = UDim2.new(frame.Size.X.Scale,frame.Size.X.Scale, frame.Size.Y.Scale,frame.Size.Y.Scale*Shape_Settings.Size)

If you want to purely use scale, make sure that the 2nd and 4th arguments of UDim2.new are 0, and that should help ensure that your proportions stay the same.

2 Likes

This will need to be done for the descendant GuiObjects of that frame as well.

1 Like