ScreenGui

ScreenGuiは、Robloxでプレイヤーの画面に表示される2Dユーザーインターフェース要素のコンテナです。基本的なコントロールや情報を提供します。

** PlayerGuiに親付けされる必要があります。StarterGuiを使用すると、プレイヤーが参加したときにそれが各プレイヤーのPlayerGuiにクローンされます。
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = game.Players.LocalPlayer: WaitForChild("PlayerGui")

ScreenGuiのプロパティ

TypesDetails
ClipToDeviceSafeAreaコンテンツをデバイスの安全エリアにクリップします。
DisplayOrderScreenGuiのZインデックス順序を制御し、値が大きいほど上に表示されます。
IgnoreGuiInsetScreenGuiがRobloxのコアUI要素にオーバーフローするかどうかを決定します。
ScreenInsets画面上の表示領域を定義します。

CoreUISafeInsets

CoreUISafeInsetsUI要素をコアUI安全領域内に保持し、トップバーのボタンや画面の切り欠きを避けます(デフォルト)。
None安全領域の制約なし; UI要素がコアUIまたはデバイスの切り欠きによって隠れる可能性があります。非インタラクティブなコンテンツに適しています。
TopbarSafeInsetsUI要素が最も左側のRobloxコントロールとデバイスの安全領域の間に保持されるようにし、衝突を避けるために動的に調整します。
DeviceSafeInsetsデバイスの安全領域全体にインセットを適用し、画面の切り欠きやノッチを避けます。
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

このチュートリアルがお役に立ちましたら、私の仕事をサポートするためにコーヒーをおごっていただけると嬉しいです。

ご支援、誠にありがとうございます!

コーヒーをおごる