Hello, Do you guys know the full screen size is for a GUI, because at the very top there is still some room that is not filled with the UI, If you guys know what it is, can you please leave it in the replys.
Thanks!
Hello, Do you guys know the full screen size is for a GUI, because at the very top there is still some room that is not filled with the UI, If you guys know what it is, can you please leave it in the replys.
Thanks!
That empty space is caused by Roblox having a GUI inset of 36 pixels from the top of your screen. You can ignore this inset for individual ScreenGui
instances by setting their IgnoreGuiInset
properties to true
. In some situations, it could make sense to call GuiService:GetGuiInset()
to get the current GUI inset, just in case it ever changes.
Whenever you’re dealing with screen coordinates, you should also be aware of those fun special cases where something expects coordinates with inset and you provide coordinates without inset. Good luck figuring out where you need to use what, working with UI can sometimes be a mess.
If you’re just trying to make your GUI cover the entire screen, it should be sufficient to either
ScreenGui
's IgnoreGuiInset
property to true
.Most of the time, you don’t really need GuiService:GetGuiInset()
. This function is only relevant when you need to work with the current position of the player’s mouse relative to the GUI inset. If you know you need the absolute mouse position without the GUI inset (most likely when using IgnoreGuiInset
), it may be a good idea to learn more about working with the player’s mouse.
If all you want to do is make sure the entire screen is covered by your GUI and all you need is a bunch of buttons, and the exact mouse position doesn’t matter, you don’t need GuiService:GetGuiInset()
.
almost 12 minutes of typing hopefully well spent
Awesome, Thanks! It seems that you know alot about roblox studio.