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

I have to size an GUI 1.2 on the y axis and position it -0.2 to fit full screen?

Asked by 3 years ago
Edited 3 years ago

So I know that for a UI Frame to be a full screen it is 1,0,1,0 and the position is 0,0,0,0

But the problem is that if I did 1,0,1,0 and positioned it 0,0,0,0

There would be that little bar at the top, which would show

So I am asking for an solution what am I doing wrong

Am I right to size an GUI Frame 1.2 on the y axis of scale and then position it -0.2 on the y axis?

Or Is there something im missing here

I don't understand

I thought 1,0,1,0 was for the full screen

0
No, you got it all correct, the problem is the TopBar doesn't count as screen so your frame isn't going through the TopBar. But yea, use -0.2 on the Y axis and keep it at 1.2 y scale and it should be all fine. JB_SuperGamer 165 — 3y
0
You don't need any fancy positioning or sizing, fill the screen as normal and enable the IgnoreGuiInset field. Ziffixture 6913 — 3y

3 answers

Log in to vote
1
Answered by 3 years ago

You're not doing anything wrong. It's just that Roblox has a 36 (thirty-six) pixel inset which moves all ScreenGui downwards by the same amount.

If you just want to cover the topbar you can either set the IgnoreGuiInset property for a ScreenGui to false. Or you can set the position property to {0,0},{0,-36}. If you have any buttons there they won't be clickable.

If you want to also disable the topbar look here.

Ad
Log in to vote
0
Answered by
pwx 1581 Moderation Voter
3 years ago

What I like to use is AnchorPoint. Change the Vector2 to Vector2.new(.5,.5) position dead middle for all screens.

Then I'd put the Y UDim2 on 1.2 just to be sure. Like so:

local Frame = Instance.new('Frame')
Frame.Parent = UI -- obviously change this to the actual parent lol
Frame.Size = UDim2.new(1,0,1.2,0)
Frame.AnchorPoint = Vector2.new(.5,.5)
Log in to vote
0
Answered by 3 years ago

Ok I am going to use my formula The Frame's size should be {1,0}{1.1,0} Then the Frame's position should be {0,0}{0,-35} You can use anchor point or not.

Answer this question