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

Force Gui Absolute size?

Asked by 9 years ago

I'm trying to force the StarterGui AbsoluteSize to = 1000,1000:

script.Parent.AbsoluteSize = Vector2.new(1000,1000)

returns can't set value

0
You can't set the size of the Startergui, however you can set the size of things such as Frames and GuiObjects. You need to use Size, not AbosluteSize though. dyler3 1510 — 9y
0
I know, but I forgot to adjust my gui to the absolute size when I made it, so I wanted to take a shortcut rather than changing the whole gui, thanks BSIncorporated 640 — 9y

2 answers

Log in to vote
1
Answered by 9 years ago

You cannot change the size of the StarterGui, but you can create a Frame, make its background transparent, set its Size to UDim2.new(0, 1000, 0, 1000), and put the rest of your gui as a child of this frame. The frame's parent should be a ScreenGui, whose parent is StarterGui.

Note that using an absolute size like this means that players running a lower resolution may not see your entire GUI. Consider using a script to check the AbsoluteSize of the ScreenGui and adjust the size of the frame I described accordingly (ex if the Absolute Size is 1200x600, make the frame's size UDim2.new(0, 1000, 0, 600))

Ad
Log in to vote
0
Answered by
RM0d 305 Moderation Voter
9 years ago

AbsoluteSize is a read only varaible. This is to be used with scale. This will change depending on the screen resoulution.

On 1080p a gui with UDim2.new(0.5,0,0.5,0) will take up 960,540

A screen that is 100px by 100 px would take up 50,50

So The AbsoluteSize is 50,50 or 960,540.

Answer this question