Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a way to detect how big your monitor is?

Asked by 9 years ago

I'm making GUIs and on my smaller monitor it covers the whole thing, but on my bigger one it covers only half. Is there a way to detect how big your monitor is and setting your Gui to cover the whole screen? Does the ROBLOX wiki explain this?

2 answers

Log in to vote
2
Answered by 9 years ago

Just use Scale to size your GUIs and it will remain consistent throughout all monitors. If you don't know what Scale is or how to use it, you can check out this similar question I answered. The Roblox WIki doesn't go too in-depth about Scale in their UDim2 article, but if it helps, you can read it here.

Ad
Log in to vote
2
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

There isn't exactly a way to detect the dimensions of the client's screen, but there's an alternative.

Using the Scale argument while setting the UDim2 dimensions of a gui, rather than using Offset.

The Scale argument is the first number inside the brackets, the Offset is the Second number.

So say you have this;

gui.Size = UDim2.new(0,200,0,200)

To make it the same for all screen sizes you can do this(estimated);

gui.Size = UDim2.new(.2,0,.2,0)

Answer this question