ScreenGui

ScreenGui is a container for 2D user interface elements in Roblox, displayed on the player's screen. It provides essential controls and information.

** Must be parented to PlayerGui to be visible. Using StarterGui ensures it clones into each player's PlayerGui on joining.
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = game.Players.LocalPlayer: WaitForChild("PlayerGui")

ScreenGui Properties

TypesDetails
ClipToDeviceSafeAreaClips contents to the device's safe area.
DisplayOrderControls the Z-index order of ScreenGuis, with higher values rendering on top.
IgnoreGuiInsetDetermines whether the ScreenGui overflows into Roblox's core UI elements.
ScreenInsetsDefines the display region on screen.

CoreUISafeInsets

CoreUISafeInsetsKeeps UI elements within the core UI safe area, avoiding top bar buttons and screen cutouts (default).
NoneNo safe area constraints; UI elements may be obscured by core UI or device cutouts, suitable for non-interactive content.
TopbarSafeInsetsEnsures UI elements are kept between the left-most Roblox controls and the device safe area, adjusting dynamically to avoid collisions.
DeviceSafeInsetsApplies insets for the entire device's safe area, avoiding any screen cutouts or notches.
Image 1
Roblox Studio
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "Display_CoreUISafeInsets"
screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
screenGui.ScreenInsets = Enum.ScreenInsets.CoreUISafeInsets

local frame = Instance.new("Frame")
frame.Size = UDim2.new(1, 0, 1, 0)
frame.Position = UDim2.new(0, 0, 0, 0)
frame.BackgroundTransparency = 0.5
frame.BackgroundColor3 = Color3.fromRGB(255, 0, 0)  -- Red for CoreUISafeInsets
frame.Parent = screenGui

local label = Instance.new("TextLabel")
label.Text = "CoreUISafeInsets"
label.BackgroundTransparency = 0
label.BackgroundColor3 = Color3.fromRGB(255, 255, 255)  -- White background
label.TextColor3 = Color3.fromRGB(0, 0, 0)  -- Black text
label.Size = UDim2.new(0.3, 0, 0.1, 0)
label.Position = UDim2.new(0.35, 0, 0.45, 0)
label.Parent = frame
Image 1
Roblox Studio
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "Display_None"
screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
screenGui.ScreenInsets = Enum.ScreenInsets.None

local frame = Instance.new("Frame")
frame.Size = UDim2.new(1, 0, 1, 0)
frame.Position = UDim2.new(0, 0, 0, 0)
frame.BackgroundTransparency = 0.5
frame.BackgroundColor3 = Color3.fromRGB(0, 255, 0)  -- Green for None
frame.Parent = screenGui

local label = Instance.new("TextLabel")
label.Text = "None"
label.BackgroundTransparency = 0
label.BackgroundColor3 = Color3.fromRGB(255, 255, 255)  -- White background
label.TextColor3 = Color3.fromRGB(0, 0, 0)  -- Black text
label.Size = UDim2.new(0.3, 0, 0.1, 0)
label.Position = UDim2.new(0.35, 0, 0.45, 0)
label.Parent = frame
Image 1
Roblox Studio
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "Display_TopbarSafeInsets"
screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
screenGui.ScreenInsets = Enum.ScreenInsets.TopbarSafeInsets

local frame = Instance.new("Frame")
frame.Size = UDim2.new(1, 0, 1, 0)
frame.Position = UDim2.new(0, 0, 0, 0)
frame.BackgroundTransparency = 0.5
frame.BackgroundColor3 = Color3.fromRGB(0, 0, 255)  -- Blue for TopbarSafeInsets
frame.Parent = screenGui

local label = Instance.new("TextLabel")
label.Text = "TopbarSafeInsets"
label.BackgroundTransparency = 0
label.BackgroundColor3 = Color3.fromRGB(255, 255, 255)  -- White background
label.TextColor3 = Color3.fromRGB(0, 0, 0)  -- Black text
label.Size = UDim2.new(0.3, 0, 0.1, 0)
label.Position = UDim2.new(0.35, 0, 0.45, 0)
label.Parent = frame
Image 1
Roblox Studio
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "Display_DeviceSafeInsets"
screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
screenGui.ScreenInsets = Enum.ScreenInsets.DeviceSafeInsets

local frame = Instance.new("Frame")
frame.Size = UDim2.new(1, 0, 1, 0)
frame.Position = UDim2.new(0, 0, 0, 0)
frame.BackgroundTransparency = 0.5
frame.BackgroundColor3 = Color3.fromRGB(255, 255, 0)  -- Yellow for DeviceSafeInsets
frame.Parent = screenGui

local label = Instance.new("TextLabel")
label.Text = "DeviceSafeInsets"
label.BackgroundTransparency = 0
label.BackgroundColor3 = Color3.fromRGB(255, 255, 255)  -- White background
label.TextColor3 = Color3.fromRGB(0, 0, 0)  -- Black text
label.Size = UDim2.new(0.3, 0, 0.1, 0)
label.Position = UDim2.new(0.35, 0, 0.45, 0)
label.Parent = frame