Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
StarterGui
Inherits from: BasePlayerGui → Instance → Object
StarterGui is a container object designed to hold LayerCollector objects such as ScreenGuis.
When a Player.Character spawns, the contents of their PlayerGui (if any) are emptied. Children of the StarterGui are then copied along with their descendants into the PlayerGui. Note, however, that LayerCollector objects such as ScreenGuis with their ResetOnSpawn property set to false will only be placed into each player's PlayerGui once and will not be deleted when the Player respawns.
StarterGui also includes a range of functions allowing you to interact with the CoreGui. For example StarterGui:SetCoreGuiEnabled() can be used to disable elements of the CoreGui, and StarterGui:SetCore() can perform a range of functions including creating notifications and system messages.
Inherits from: BasePlayerGui
Memory category: Instances
Tags: NotCreatable, Service
Properties
| Name | Type / Returns | Description |
|---|---|---|
| StarterGui.ClipsDescendantsSupportsRotation | RolloutState | Determines whether the ClipsDescendants property of a GuiObject clips rotated descendants. |
| StarterGui.ProcessUserInput | boolean | Allows this service to process input like PlayerGui and CoreGui do. |
| StarterGui.ResetPlayerGuiOnSpawn | boolean | Determines whether each child parented to the StarterGui will be cloned into a player's PlayerGui when that player's character is respawned. |
| StarterGui.RtlTextSupport | RtlTextSupport | Controls whether right-to-left (RTL) text layout is enabled for text in GuiObjects throughout the experience. |
| StarterGui.ScreenOrientation | ScreenOrientation | Sets the default screen orientation mode for users with mobile devices. |
| StarterGui.ShowDevelopmentGui | boolean | Determines whether the contents of StarterGui is visible in Studio. |
| StarterGui.VirtualCursorMode | VirtualCursorMode | Controls whether the gamepad virtual cursor is enabled for navigating GuiObjects with a controller. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.Archivable | boolean | Determines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published. |
| Instance.archivable | boolean | |
| Instance.Capabilities | SecurityCapabilities | The set of capabilities allowed to be used for scripts inside this container. |
| Instance.IsInSandbox | boolean | Indicates whether the instance is inside a sandboxed container. |
| Instance.Name | string | A non-unique identifier of the Instance. |
| Instance.Parent | Instance | Determines the hierarchical parent of the Instance. |
| Instance.PredictionMode | PredictionMode | Reflects the client-side prediction mode applied to the instance under server-authoritative physics. |
| Instance.RobloxLocked | boolean | A deprecated property that used to protect CoreGui objects. |
| Instance.Sandboxed | boolean | When enabled, the instance can only access abilities in its Capabilities list. |
| Instance.UniqueId | UniqueId | A unique identifier for the instance. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.ClassName | string | A read-only string representing the class this Object belongs to. |
| Object.className | string |
StarterGui.ClipsDescendantsSupportsRotation
If true, the ClipsDescendants property of a GuiObject clips its rotated descendants.
| Field | Value |
|---|---|
| type | RolloutState |
| tags | ["NotScriptable"] |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
StarterGui.ProcessUserInput
Allows StarterGui to process input like PlayerGui and CoreGui do. The default value is false.
| Field | Value |
|---|---|
| type | boolean |
| tags | ["Hidden","NotReplicated"] |
| security | {"read":"PluginSecurity","write":"PluginSecurity"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":false,"can_save":false} |
| capabilities | ["UI"] |
StarterGui.ResetPlayerGuiOnSpawn
Deprecated. This property is deprecated. Use LayerCollector.ResetOnSpawn to control the resetting behavior for individual LayerCollector objects.
If set to true, each child parented to the StarterGui will be cloned into a player's PlayerGui when that player's character is respawned.
If one of the children is a PlayerGui and it has its PlayerGui property set to false, it will not be cloned.
| Field | Value |
|---|---|
| type | boolean |
| tags | ["Deprecated"] |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
StarterGui.RtlTextSupport
This property determines whether right-to-left (RTL) text layout is applied to the text of GuiObjects in the experience, which is needed to correctly display languages written right-to-left, such as Arabic and Hebrew.
The default value is RtlTextSupport.Default. Both RtlTextSupport.Default and RtlTextSupport.Enabled turn RTL text layout support on, while RtlTextSupport.Disabled turns it off.
| Field | Value |
|---|---|
| type | RtlTextSupport |
| tags | ["NotScriptable"] |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
StarterGui.ScreenOrientation
This property sets the preferred screen orientation mode for users with mobile devices. For the different modes available, see ScreenOrientation.
By default, this property is set to Sensor, meaning the experience is displayed depending on the best match to the device's current orientation, either landscape (left/right) or portrait.
When a Player joins the experience on a mobile device, this property determines the device's starting orientation and sets that player's PlayerGui.ScreenOrientation accordingly. You can also get the player's current screen orientation through PlayerGui.CurrentScreenOrientation, useful when using one of the "sensor" ScreenOrientation settings.
Note that changing this property will not change the screen orientation for Players already in the experience. To change the orientation for an existing player, use their PlayerGui.ScreenOrientation property.
| Field | Value |
|---|---|
| type | ScreenOrientation |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
StarterGui.ShowDevelopmentGui
This property determines whether the contents of StarterGui is visible in Studio.
| Field | Value |
|---|---|
| type | boolean |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
StarterGui.VirtualCursorMode
This property determines whether the gamepad virtual cursor, which lets players move a pointer across on-screen GuiObjects using a controller, is enabled.
The default value is VirtualCursorMode.Default. Setting it to VirtualCursorMode.Enabled turns the virtual cursor on and VirtualCursorMode.Disabled turns it off. When a player is in VR, the virtual cursor is always active regardless of this property's value.
| Field | Value |
|---|---|
| type | VirtualCursorMode |
| tags | ["NotScriptable"] |
| security | {"read":"None","write":"None"} |
| thread safety | ReadSafe |
| category | Behavior |
| serialization | {"can_load":true,"can_save":true} |
| capabilities | ["UI"] |
Methods
| Name | Type / Returns | Description |
|---|---|---|
| StarterGui:GetCore | Variant | Returns a variable that has been specified by a Roblox core script. |
| StarterGui:GetCoreGuiEnabled | boolean | Returns whether the given CoreGuiTypeis enabled, or if it has been disabled using StarterGui:SetCoreGuiEnabled(). |
| StarterGui:SetCore | () | Allows you to perform certain interactions with Roblox's core scripts. |
| StarterGui:SetCoreGuiEnabled | () | Sets whether the CoreGui element associated with the given CoreGuiType is enabled or disabled. |
Inherited from BasePlayerGui
| Name | Type / Returns | Description |
|---|---|---|
| BasePlayerGui:GetGuiObjectsAtPosition | Instances | Returns a list of all GuiObject instances occupying the given |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance:AddTag | () | Applies a tag to the instance. |
| Instance:children | Instances | Returns an array of the object's children. |
| Instance:ClearAllChildren | () | This method destroys all of an instance's children. |
| Instance:Clone | Instance | Create a copy of an instance and all its descendants, ignoring instances that are not Archivable. |
| Instance:clone | Instance | |
| Instance:Destroy | () | Sets the Instance.Parent property to nil, locks the Instance.Parent property, disconnects all connections, and calls Destroy() on all children. |
| Instance:destroy | () | |
| Instance:FindFirstAncestor | Instance? | Returns the first ancestor of the Instance whose Instance.Name is equal to the given name. |
| Instance:FindFirstAncestorOfClass | Instance? | Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className. |
| Instance:FindFirstAncestorWhichIsA | Instance? | Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstChild | Instance? | Returns the first child of the Instance found with the given name. |
| Instance:findFirstChild | Instance | |
| Instance:FindFirstChildOfClass | Instance? | Returns the first child of the Instance whose ClassName is equal to the given class name. |
| Instance:FindFirstChildWhichIsA | Instance? | Returns the first child of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstDescendant | Instance? | Returns the first descendant found with the given Instance.Name. |
| Instance:GetActor | Actor? | Returns the Actor associated with the Instance, if any. |
| Instance:GetAttribute | Variant | Returns the value which has been assigned to the given attribute name. |
| Instance:GetAttributeChangedSignal | RBXScriptSignal | Returns an event that fires when the given attribute changes. |
| Instance:GetAttributes | Dictionary | Returns a dictionary of the instance's attributes. |
| Instance:GetChildren | Instances | Returns an array containing all of the instance's children. |
| Instance:getChildren | Instances | |
| Instance:GetDebugId | string | Returns a coded string of the debug ID used internally by Roblox. |
| Instance:GetDescendants | Instances | Returns an array containing all of the descendants of the instance. |
| Instance:GetFullName | string | Returns a string describing the instance's ancestry. |
| Instance:GetStyled | Variant | Returns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified. |
| Instance:GetStyledPropertyChangedSignal | RBXScriptSignal | Returns an event that fires when the given style property changes on the instance. |
| Instance:GetTags | Array | Gets an array of all tags applied to the instance. |
| Instance:HasTag | boolean | Check whether the instance has a given tag. |
| Instance:IsAncestorOf | boolean | Returns true if an Instance is an ancestor of the given descendant. |
| Instance:IsDescendantOf | boolean | Returns true if an Instance is a descendant of the given ancestor. |
| Instance:isDescendantOf | boolean | |
| Instance:IsPropertyModified | boolean | Returns true if the value stored in the specified property is not equal to the code-instantiated default. |
| Instance:QueryDescendants | Instances | Returns an array containing all descendants of the instance that match the selector string. |
| Instance:Remove | () | Sets the object's Parent to nil, and does the same for all its descendants. |
| Instance:remove | () | |
| Instance:RemoveTag | () | Removes a tag from the instance. |
| Instance:ResetPropertyToDefault | () | Resets a property to its default value. |
| Instance:SetAttribute | () | Sets the attribute with the given name to the given value. |
| Instance:WaitForChild | Instance | Returns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object:GetPropertyChangedSignal | RBXScriptSignal | Get an event that fires when a given property of the object changes. |
| Object:IsA | boolean | Returns true if an object's class matches or inherits from a given class. |
| Object:isA | boolean |
StarterGui:GetCore
This method returns data set or made available by Roblox's core scripts. The first and only parameter is a string that selects the information to be fetched. The following sections describe the strings and the data they return by this function.
Calling this method may yield. Many of these also register an equivalent SetCore() function (these are marked with an asterisk).
PointsNotificationsActive *
Returns true if player point notifications are enabled.
BadgesNotificationsActive *
Returns true if badge notifications are enabled.
AvatarContextMenuEnabled *
Returns true if the Avatar Context Menu is enabled.
ChatActive *
Returns whether the chat is active or not. This is indicated by the selection state of the top bar's chat icon.
ChatWindowSize *
Returns the size of the chat window as a UDim2.
ChatWindowPosition *
Returns the size of the chat window as a UDim2.
ChatBarDisabled *
Returns true if the chat bar is disabled.
GetBlockedUserIds
Returns a list of UserIds associated with users that have been blocked by the local player.
PlayerBlockedEvent
Returns a BindableEvent that is fired whenever a player is blocked by the local player.
PlayerUnblockedEvent
Returns a BindableEvent that is fired whenever a player is unblocked by the local player.
PlayerMutedEvent
Returns a BindableEvent that is fired whenever a player is muted by the local player.
PlayerUnmutedEvent
Returns a BindableEvent that is fired whenever a player is unmuted by the local player.
PlayerFriendedEvent
Returns a BindableEvent that is fired whenever a player is connected by the local player.
PlayerUnfriendedEvent
Returns a BindableEvent that is fired whenever a player is unconnected by the local player.
DevConsoleVisible *
Returns true if the Developer Console is visible.
VRRotationIntensity
Returns a string describing the camera rotation sensitivity in VR: Low, High and Smooth. This will not be available unless VRService.VREnabled is true.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| parameterName | string | The name of the core parameter to retrieve, such as "PointsNotificationsActive" or "ChatActive". |
Returns
| Type | Description |
|---|---|
| Variant | The value associated with the specified core parameter name, whose type depends on the parameter queried. |
| Field | Value |
|---|---|
| tags | ["Yields"] |
| security | None |
| thread safety | Unsafe |
| capabilities | ["UI"] |
StarterGui:GetCoreGuiEnabled
This function returns whether the given CoreGuiTypeis enabled, or if it has been disabled using StarterGui:SetCoreGuiEnabled(). This function should be called on the client.
Note that setting "TopbarEnabled" to false using SetCore() hides all CoreGuiTypes but does not affect the result of this function.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| coreGuiType | CoreGuiType | The given CoreGuiType. |
Returns
| Type | Description |
|---|---|
| boolean | Whether the given CoreGuiType is enabled. |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["UI"] |
Code samples: View on Creator Hub (StarterGui-GetCoreGuiEnabled1).
StarterGui:SetCore
This method (not to be confused with SetCoreGuiEnabled()) exposes a variety of functionality defined by Roblox's core scripts, such as sending notifications, toggling notifications for badges/points, defining a callback for the reset button, or toggling the topbar.
The first parameter is a string that selects the functionality with which the call will interact. It may be necessary to call this method multiple times using LuaGlobals.pcall() in case the respective core script has not yet loaded (or if it has been disabled entirely).
The following table describes the strings that may be accepted as the first parameter. The parameters that should follow are dependent on the functionality that will be used and are described in sub-tables.
ChatActive
Controls whether the chat is active.
| Name | Type | Default | Description |
|---|---|---|---|
active | boolean | (required) | Determines whether the chat should be made active. |
PointsNotificationsActive
Controls whether notifications for earned player points will appear.
| Name | Type | Default | Description |
|---|---|---|---|
active | boolean | (required) | Determines whether notifications for earned player points will appear. |
BadgesNotificationsActive
Controls whether notifications for earned badges will appear.
| Name | Type | Default | Description |
|---|---|---|---|
active | boolean | (required) | Determines whether notifications for earned badges will appear. |
ResetButtonCallback
Determines the behavior, if any, of the reset button given a boolean or a BindableEvent to be fired when a player requests to reset.
| Name | Type | Default | Description |
|---|---|---|---|
enabled | boolean | (required) | Determines whether the reset button retains its default behavior. |
| OR | |||
callback | Class.BindableEvent | (required) | A Class.BindableEvent to be fired when the player confirms they want to reset. |
ChatMakeSystemMessage
Display a formatted message in the chat. Using this method requires the experience's TextChatService.ChatVersion to be set to LegacyChatService, although legacy chat is deprecated and usage is discouraged. For experiences using the current TextChatService, refer to TextChannel:DisplaySystemMessage().
| Name | Type | Default | Description |
|---|---|---|---|
configTable | dictionary | (required) | A dictionary of information describing the message (see below). |
| Name | Type | Default | Description |
|---|---|---|---|
Text | string | (required) | The message to display. |
Color | Datatype.Color3 | Datatype.Color3.fromRGB(255, 255, 243) | Text color of the message. |
Font | Enum.Font | SourceSansBold | Font of the message. |
TextSize | integer | 18 | Text size of the message. |
SendNotification
Causes a non-intrusive notification to appear at the bottom right of the screen. The notification may have up to two buttons.
| Name | Type | Default | Description |
|---|---|---|---|
configTable | dictionary | (required) | A dictionary of information describing the notification (see below). |
| Name | Type | Default | Description |
|---|---|---|---|
Title | string | (required) | The title of the notification. |
Text | string | (required) | The main text of the notification. |
Icon | string | The image to display with the notification. | |
Duration | number | 5 | Duration (in seconds) the notification should stay visible. |
Callback | Class.BindableFunction | A Class.BindableFunction that should be invoked with the text of the button pressed by the player. | |
Button1 | string | The text to display on the first button. | |
Button2 | string | The text to display on the second button. |
TopbarEnabled
Determines whether the topbar is displayed. Disabling the topbar will also disable all CoreGuis such as the chat, inventory, and player list (for example, those set with SetCoreGuiEnabled).
When disabled, the region the topbar once occupied will still capture mouse events; however, buttons placed there will not respond to clicks. The origin of GUI space will still be offset 36 pixels from the top of the screen.
| Name | Type | Default | Description |
|---|---|---|---|
enabled | boolean | (required) | Determines whether the topbar should be visible. |
DevConsoleVisible
Determines whether the Developer Console is visible.
| Name | Type | Default | Description |
|---|---|---|---|
visibility | boolean | (required) | Determines whether the console is visible. |
PromptSendFriendRequest
Prompts the current player to send a friend request to the given Player.
| Name | Type | Default | Description |
|---|---|---|---|
player | Class.Player | (required) | The player to which the friend request should be sent. |
PromptUnfriend
Prompts the current player to remove a given Player from their friends list.
| Name | Type | Default | Description |
|---|---|---|---|
player | Class.Player | (required) | The player who should be unconnected. |
PromptBlockPlayer
Prompts the current player to block the given Player.
| Name | Type | Default | Description |
|---|---|---|---|
player | Class.Player | (required) | The player who should be blocked. |
PromptUnblockPlayer
Prompts the current player to unblock the given Player.
| Name | Type | Default | Description |
|---|---|---|---|
player | Class.Player | (required) | The player who should be unblocked. |
AvatarContextMenuEnabled
Determines whether the Avatar Context Menu is enabled.
| Name | Type | Default | Description |
|---|---|---|---|
enabled | boolean | (required) | Determines whether the context menu is enabled. |
AvatarContextMenuTarget
Forcibly opens the Avatar Context Menu.
| Name | Type | Default | Description |
|---|---|---|---|
player | Class.Player | (required) | The player on whom the context menu will be opened. |
AddAvatarContextMenuOption
Adds an option to the Avatar Context Menu.
| Name | Type | Default | Description |
|---|---|---|---|
option | Enum.AvatarContextMenuOption | (required) | Option to add. |
| OR | |||
option | table | (required) | A two-element table, where the first is the name of the custom action, and the second is a Class.BindableEvent which will be fired with a player was selected when the option was activated. |
RemoveAvatarContextMenuOption
Removes an option to the Avatar Context Menu. The option argument must be the same as what was used with "AddAvatarContextMenuOption" (see above).
| Name | Type | Default | Description |
|---|---|---|---|
option | Variant | (required) | The same value provided to AddAvatarContextMenuOption. |
AvatarContextMenuTheme
Configures the customizable Avatar Context Menu which is an opt-in feature that allows easy player-to-player social interaction via custom actions, such as initiating trades, battles, and more. For more info on how to customize its theme, see the Avatar Context Menu article.
CoreGuiChatConnections
Sets up a bindable gateway connection between the CoreGui topbar's chat button and the legacy chat system. The second parameter must be a table of BindableEvents and BindableFunctions.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| parameterName | string | Selects the functionality with which the call will interact. | |
| value | Variant | A table of BindableEvents and BindableFunctions. |
Returns
| Type | Description |
|---|---|
| () |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["UI"] |
Code samples: View on Creator Hub (StarterGui-SetCore1).
StarterGui:SetCoreGuiEnabled
This function sets whether the CoreGui element associated with the given CoreGuiType is enabled or disabled.
The top bar cannot be disabled using this function. To disable it, set "TopbarEnabled" to false using StarterGui:SetCore().
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| coreGuiType | CoreGuiType | The given CoreGuiType. | |
| enabled | boolean | Whether to enable or disable the given CoreGuiType. |
Returns
| Type | Description |
|---|---|
| () |
| Field | Value |
|---|---|
| security | None |
| thread safety | Unsafe |
| capabilities | ["UI"] |
Events
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.AncestryChanged | Fires when the Instance.Parent property of this object or one of its ancestors is changed. | |
| Instance.AttributeChanged | Fires whenever an attribute is changed on the Instance. | |
| Instance.ChildAdded | Fires after an object is parented to this Instance. | |
| Instance.childAdded | ||
| Instance.ChildRemoved | Fires after a child is removed from this Instance. | |
| Instance.DescendantAdded | Fires after a descendant is added to the Instance. | |
| Instance.DescendantRemoving | Fires immediately before a descendant of the Instance is removed. | |
| Instance.Destroying | Fires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy(). | |
| Instance.StyledPropertiesChanged | Fires whenever any style property is changed on the instance, including when a property is set to nil. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.Changed | Fires immediately after a property of the object changes, with some limitations. |