Hello developers! I’ve looked around the forum but I cannot find an answer yet, please bare with me. So I am trying to script an information GUI on hover (as you can see in the photo) but the text labels overlap each other when the screen resolution is small, and have enormous spaces between them when the screen resolution is big. I would like them to have the same spacing in between them regardless of the screen resolution. Sorry if it is relatively simple but GUIs aren’t my forte. Any help will be appreciated, thank you!

Are they placed using Scale or Offset?
Are they sized using Scale or Offset?
Are they TextScaled or a fixed TextSize?
RS:BindToRenderStep("Hover",Enum.RenderPriority.Camera.Value - 1,function()
--// Set positions.
local MousePos = UIS:GetMouseLocation()
local Xoffset = 0.15
Gui.PlayerName.Position = UDim2.new(Xoffset,MousePos.X,0,MousePos.Y)
for i = 1,6 do
local Multiplier = i * 0.03
Gui[tostring(i)].Position = UDim2.new(Xoffset,MousePos.X,Multiplier,MousePos.Y)
end
They are sized using scale but offset using the mouse’s position.
By the way that is not the full script (just in case you point out the missing statements), just the part relating to the text labels.
If you’re going to use the mouse to place them using offset, you will want to size them using offset too, to achieve a consistent size for each text label on every screen. That way you can decide with pixel-precision how you want them placed relative to one another.
Example: if you want TextSize 24, then you’d make each TextLabel Size {1, 0},{0, 24} so they take up 24 pixels in height. You’d pop them all into a frame and use UIListLayout as @TheCarbyneUniverse pointed out below!
Aah, yes, I think a simple solution might be to use a UILIstLayout. Your text labels seem like they’re in a list already, plus this specific layout allows for the elements to be of any size. The only thing it will control is the position (via the padding property, which only applies in the Y direction).
I assume you already have a frame right? If not, add a frame, and put the UIListLayout + the text labels inside of it.
@BanTech and @TheCarbyneUniverse thank you both of your responses, is it possible for the texts to be of the same size without the UIListLayout? Probably using:
This? Because I have already sorted them out via my script. If not I will just give it a shot haha.
@BanTech and @TheCarbyneUniverse thank you both for your solutions, they work. ![]()
