How to position a topbar icon

Hello again

  1. What do you want to achieve? I have some topbar buttons in my game, I didn’t make them though, they are all put right beside the chat so most of them are unclickable, like overalpping each other

  2. What is the issue? Like in the previous sentence, the topbar icons overlap each other

  3. What solutions have you tried so far? I looked EVERYWHERE, yt, devforum, i couldn’t find anything, maybe im just dumb but who knows

The script should be inside the icon button where the topbar button is, so it is easy to see what the problem is

Thanks for reading!

Disable IgnoreGuiInset from the ScreenGui to make them be at the very top of the screen.

Yes, its at the top of the screen already, I need to move it sideways

A UIListLayout will automatically position them with a few adjustments to the settings of it. You’ll want to change the FillDirection to Horizontal.

Idk how to make that, I dont really know how to script

So, basically, you’re going to need to change the Offset of the buttons.

For the first, I think the X, Y position needs to be 4, 76. And for all subsequent icons, assuming that it is 32x32, add 36 onto the Y positioning of the previous icon (offset). (I think this positioning is right, haven’t been in Studio in a while)

I hope this is clear enough.

Also, a UIListLayout is just an instance that you can place in a Frame, that will order elements horizontally or vertically, no scripting is required.

do you mean for the absolutecontentsize?
because i cant edit that

I mean the actual Offset values in Size

You could just position the buttons the way you want them to look like then use Auto Scale Plugin

Woah, I thought the topic was dead! Thanks for solving the problem, with a detailed explanation

Now I just have to learn how to script that all :+1:

1 Like

Think this is supposed to be 104 not 105, but yeah, that’s right

If I’m right, a black 0.5 transparency frame with 0, 8 on a UICorner works just as well

And besides, it’s slightly more efficient going through Roblox’s files and specifying the file instead of specifying an image uploaded. Pretty sure it’s located in textures/UI/TopBar/ (can’t remember icon name but you should be able to see it).

Depending on the icon, 0,24 should be the size on both the X and Y axis (depends whether the icon has any padding or not). If you set the size to 0,24, set the position to 0,4 on both the X and Y axis.