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?
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.
make size {1, 0}, {1, 0}
Instead of having to put in the position as (0,<Number> 0, <Number>) that will make it so the position can't cover everything but if you do: (<Number>,0, <Number>, 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.