Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a gui cover the whole screen on every device or screen size?

so I'm making a loading gui and I have everything sorted out. Besides the size of the gui. I want it to cover the whole screen on every screen size. How I do dis?

4 answers

✓ Accepted answer

Change the size to (1,0,1,36) and the position to (0,0,0,-36). That should make it cover the whole screen. If it doesn't, let me know.

2 comments

0

Thanks, that helped but one more thing, how do I center it? I have a video at https://www.youtube.com/watch?v=7N8OiBwrk-I that will show you everything you need to know.

0

If you look through the properties of textbuttons and other gui, there's a value called anchorpoint. Change that to (5,5) then change the position to (0.5,0,0.5,0). sorry for the late response,

make size {1, 0}, {1, 0}

1 comment

0

but the thing at the top where you toggle chat backpack and menu there is no gui there and its not centered.

Instead of having to put in the position as (0, 0, ) that will make it so the position can't cover everything but if you do: (,0, , 0) it will cover the entire screen

UDim2.new(1,0,1,0)

You can get the screen size with ViewportSize property from the Camera:

local plr = game.Players.LocalPlayer
local screenGui = Instance.new("ScreenGui")
local Frame = Instance.new("Frame")
wait (0.2)
screenGui.Parent = plr.PlayerGui
Frame.Position = UDim2.new(0,0,0,-36)
Frame.Size = UDim2.new(0,game.Workspace.Camera.ViewportSize.X,0,game.Workspace.Camera.ViewportSize.Y)
Frame.Parent = screenGui

I positioned the Frame 36 pixels higher to make it go under the bar on the top of the screen, feel free to completely remove the positioning.

This discussion is preserved as it was. New answers, comments, and votes are closed.