update rules

This commit is contained in:
Joe 2026-02-02 14:05:11 -06:00
parent 4c390fdd37
commit d5522b2fef
8549 changed files with 11783 additions and 1888 deletions

View file

@ -0,0 +1,68 @@
---
title: include
---
All Roblox experiences include several UI elements that are enabled by default. If you don't need any of these elements or if you want to replace them with your own creations, you can use the `Class.StarterGui:SetCoreGuiEnabled()|SetCoreGuiEnabled()` method in a client‑side script with the associated `Enum.CoreGuiType` option.
<table>
<thead>
<tr>
<th>Default UI</th>
<th>Associated enum</th>
</tr>
</thead>
<tbody>
<tr>
<td>Dynamically updated `Class.Players` list, commonly used as a [leaderboard](../../players/leaderboards.md).</td>
<td>`Enum.CoreGuiType.PlayerList`</td>
</tr>
<tr>
<td>The character's `Class.Humanoid.Health|Health` bar. Does not appear if the character's `Class.Humanoid` is at full health.</td>
<td>`Enum.CoreGuiType.Health`</td>
</tr>
<tr>
<td>The character's `Class.Backpack` which contains [in‑experience tools](../../players/tools.md). Does not appear if there are no `Class.Tool|Tools` in the backpack.</td>
<td>`Enum.CoreGuiType.Backpack`</td>
</tr>
<tr>
<td>The [text chat](../../chat/in-experience-text-chat.md) window.</td>
<td>`Enum.CoreGuiType.Chat`</td>
</tr>
<tr>
<td>Popup menu of character [emotes](../../characters/emotes.md).</td>
<td>`Enum.CoreGuiType.EmotesMenu`</td>
</tr>
<tr>
<td>A window displaying a player's perspective or view of their own character. Does not appear unless the player has enabled **Self&nbsp;View** from the Roblox menu.</td>
<td>`Enum.CoreGuiType.SelfView`</td>
</tr>
<tr>
<td>A **capture screenshot** button along the right side of the screen. Does not appear unless the player has enabled **Captures** from the Roblox menu.</td>
<td>`Enum.CoreGuiType.Captures`</td>
</tr>
<tr>
<td>The **Avatar Switcher** allows users to change their platform avatar.</td>
<td>`Enum.CoreGuiType.AvatarSwitcher`</td>
</tr>
</tbody>
</table>
<img src="../../assets/ui/misc/CoreGui-Elements.jpg" width="840" alt="Core UI elements in every Roblox experience." />
```lua title="Client Script - Disable Default UI Elements"
local StarterGui = game:GetService("StarterGui")
-- Disable default health bar and backpack
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
```
Additionally, devices with touch capabilities include a virtual thumbstick and a jump button by default. If desired, you can hide these elements by setting `Class.GuiService.TouchControlsEnabled` to `false` in a client‑side script.
<img src="../../assets/ui/misc/TouchGui-Elements.png" width="840" alt="UI elements for touch-capable devices in every Roblox experience" />
```lua title="Client Script - Disable Touch Controls"
local GuiService = game:GetService("GuiService")
GuiService.TouchControlsEnabled = false
```

View file

@ -0,0 +1,32 @@
---
title: include
---
Modern phones take advantage of the entire screen but typically include notches, cutouts, and other elements that occupy screen space. Every Roblox experience also includes the **top bar controls** for quick access to the main menu, [chat](../../chat/in-experience-text-chat.md), [leaderboard](../../players/leaderboards.md), and more.
<img src="../../assets/engine-api/enums/ScreenInsets/Top-Bar-Cutout.png" width="840" alt="Mobile device showing Roblox top bar buttons and device cutout." />
To ensure players can see and access all UI easily and without obstruction, Roblox provides the `Class.ScreenGui.ScreenInsets|ScreenInsets` property which controls the **safe area** insets for the contents of a `Class.ScreenGui`.
<Tabs>
<TabItem label="CoreUISafeInsets">
The default of `Enum.ScreenInsets|CoreUISafeInsets` keeps all descendant `Class.GuiObject|GuiObjects` inside the core UI safe area, clear of the top bar buttons and other screen cutouts. This setting is recommended if the `Class.ScreenGui` contains interactive UI elements.
<img src="../../assets/engine-api/enums/ScreenInsets/CoreUISafeInsets.png" width="840" height="403" alt="Mobile device showing the core UI safe area." />
</TabItem>
<TabItem label="DeviceSafeInsets">
A setting of `Enum.ScreenInsets|DeviceSafeInsets` guarantees that no descendant `Class.GuiObject|GuiObjects` are occluded by any device screen cutouts such as the camera notch, although no inset is added for Roblox core UI elements like the top bar buttons.
<img src="../../assets/engine-api/enums/ScreenInsets/DeviceSafeInsets.png" width="840" height="403" alt="Mobile device showing the device safe area." />
</TabItem>
<TabItem label="TopbarSafeInsets">
A setting of `Enum.ScreenInsets|TopbarSafeInsets` keeps all descendant `Class.GuiObject|GuiObjects` between the top bar controls and the right edge of the device safe area. The `Class.ScreenGui` will then automatically flex in horizontal size based on the top bar's content.
<img src="../../assets/engine-api/enums/ScreenInsets/TopbarSafeInsets.png" width="840" height="403" alt="Mobile device showing the top bar safe area within the Roblox controls." />
</TabItem>
<TabItem label="None">
No insets are added to the fullscreen area. This mode may result in UI that is obscured or completely hidden by device notches and cutouts, so you should only use it for a `Class.ScreenGui` that contains non‑interactive content like background images.
<img src="../../assets/engine-api/enums/ScreenInsets/None.png" width="840" height="403" alt="Mobile device showing the entire screen region with no account for safe areas." />
</TabItem>
</Tabs>