AutoSize GUI not working

I am tring to use the AutoSize property to make sure everything fits inside the box but isnt working properly:

image

Am I doing something wrong on my end or is this a roblox glitch?

AutoSizeGUI.rbxl (60.3 KB)

You’ll want to post this in ui/design support, not scripting support.

(unless you have code you can provide?)

1 Like

Sorry about that sir

local player = game:GetService("Players").LocalPlayer

player.PlayerGui.ScreenGui.Header.Title.AutomaticSize = Enum.AutomaticSize.X

Have you tried using plugins? I used AutoScale Lite recently and it got the job done.

Hmm I haven’t thought about that, doesn’t that change offset to scale?

Remove your UIPadding constraint, change your HorizontalAlignment on your UIListLayout to Left.

1 Like

Worked, but looks lil stupid with out padding. How would I fix that?

image

Sorry, ignore what I said, you need to remove the size you set for X on your Title frame.

This pre-set size for the Scale is affecting the AutomaticSize from functioning properly.
Set the HorizontalAlignment back to Center (UIListLayout),
then finally, set your Wraps property to true (enable it) (UIListLayout).

1 Like

fixedMoneyGui.rbxm (10.5 KB)

A fixed version with my edits in case my written solution was a little hard to follow.

1 Like

Thank you. I feel so dumb but what is “Wraps”? (I can not find it anywhere in UIListLayout)

Well, it basically just prevents elements affected by your UIListLayout from exceeding the bounds of your parent frame. I’m not entirely sure how it fixed your issue, but I gave it a try just in case, and it worked. It might have something to do with the fact that you parented the little coin icon inside of your TextLabel, because you might notice that the UIListLayout doesn’t take that extra size into consideration (setting your padding to 0 will push the elements inside each other in your case.)

You should be able to find it under the Behavior tab.

1 Like

Wow, Wraps apparently is a Beta Feature. It would have token me ages to find it with out you and you even taught me something. You’re a 10/10 roblox dev fourm member! Thank you :slight_smile:

1 Like

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