API:Class/GuiService

Client only:This service is client-side only! You should use a LocalScript instead of a Script when using it.
Filtered-inheritance mode: While this class technically inherits all Instance class members, some (if not all) have been hidden because they serve no purpose for this object.
Service: This class is a service. It is a top-level singleton which can be obtained with the GetService method.
Uncreatable: This object cannot be created with Instance.new.

ExplorerImageIndex27.pngGuiService : Object Icon.pngInstance

The GuiService is a special service, which currently allows developers to control what GuiObject is currently being selected by the Gamepad Gui navigator, and allows clients to check if Roblox's main menu is currently open. This service has a lot of hidden members, which are mainly used internally by Roblox's CoreScripts.

Properties

PropertiesmemberhiddenProperties [toggle]

boolAutoSelectGuiEnabled

If the select button on a gamepad will automatically set a GUI as the selected object when the Select button is pressed. Turning this off will mean that Gui navigation will still work if GuiNavigationEnabled is enabled but you will have to set SelectedObject manually to start Gui navigation.

|RMD member="API:Class/GuiService/AutoSelectGuiEnabled"| If the select button on a gamepad will automatically set a GUI as the selected object when the Select button is pressed. Turning this off will mean that Gui navigation will still work if GuiNavigationEnabled is enabled but you will have to set SelectedObject manually to start Gui navigation.|/RMD|
boolCoreGuiNavigationEnabled

Toggles whether or not objects in the StarterGui icon.pngCoreGui can be navigated using a Gamepad.

|RMD member="API:Class/GuiService/CoreGuiNavigationEnabled"|Toggles whether or not objects in the StarterGui icon.pngCoreGui can be navigated using a Gamepad.|/RMD|
boolGuiNavigationEnabled

Used to enable and disable the default controller GUI navigation.

|RMD member="API:Class/GuiService/GuiNavigationEnabled"| Used to enable and disable the default controller GUI navigation.|/RMD|
boolMenuIsOpen [readonly]

Status of the ROBLOX escape menu CoreGui. Returns true if the menu is open, false if not.

|RMD member="API:Class/GuiService/MenuIsOpen"| Status of the ROBLOX escape menu CoreGui. Returns true if the menu is open, false if not.|/RMD|
Ref<GuiObject>SelectedObject

Sets the GuiObject currently being focused on by the GUI Navigator (used for Gamepads). This may reset to nil if the object is off-screen.

|RMD member="API:Class/GuiService/SelectedObject"|Sets the GuiObject currently being focused on by the GUI Navigator (used for Gamepads). This may reset to nil if the object is off-screen.|/RMD|
boolIsModalDialog [deprecated] [readonly]

Deprecated. Do not use.

|RMD member="API:Class/GuiService/IsModalDialog"|Deprecated. Do not use.|/RMD|
boolIsWindows [deprecated] [readonly]

Deprecated. Do not use.

|RMD member="API:Class/GuiService/IsWindows"|Deprecated. Do not use.|/RMD|
If the select button on a gamepad will automatically set a GUI as the selected object when the Select button is pressed. Turning this off will mean that Gui navigation will still work if GuiNavigationEnabled is enabled but you will have to set SelectedObject manually to start Gui navigation.
Toggles whether or not objects in the StarterGui icon.pngCoreGui can be navigated using a Gamepad.
Used to enable and disable the default controller GUI navigation.
MenuIsOpen [readonly]
Status of the ROBLOX escape menu CoreGui. Returns true if the menu is open, false if not.
Sets the GuiObject currently being focused on by the GUI Navigator (used for Gamepads). This may reset to nil if the object is off-screen.
IsModalDialog [deprecated] [readonly]
Deprecated. Do not use.
IsWindows [deprecated] [readonly]
Deprecated. Do not use.

Functions

FunctionsmemberhiddenFunctions [toggle]

voidAddSelectionParent ( string selectionName, GuiObject selectionParent )

Creates a gui selection group where gamepad gui navigation will only consider selectable gui objects that are within the group (children of selectionParent).

|RMD member="API:Class/GuiService/AddSelectionParent"|Creates a gui selection group where gamepad gui navigation will only consider selectable gui objects that are within the group (children of selectionParent).|/RMD|
voidAddSelectionTuple ( string selectionName, Tuple<GuiObject> selections )

Functions similarly to AddSelectionParent, but you can give it a tuple of Object Icon.pngGuiObjects that you want to be contained in the group.

|RMD member="API:Class/GuiService/AddSelectionTuple"|Functions similarly to AddSelectionParent, but you can give it a tuple of Object Icon.pngGuiObjects that you want to be contained in the group.|/RMD|
Vector2, Vector2GetGuiInset ( )

Returns two Vector2 values representing the offset of user GUIs in pixels from the top right corner of the screen and the bottom right corner of the screen respectively.

|RMD member="API:Class/GuiService/GetGuiInset"|Returns two Vector2 values representing the offset of user GUIs in pixels from the top right corner of the screen and the bottom right corner of the screen respectively.|/RMD|
boolIsTenFootInterface ( )

Returns true if the client is using the ten foot interface, which is a special version of Roblox's UI, exclusive to consoles. This is the only guaranteed way to verify if the user is on a console or not.

|RMD member="API:Class/GuiService/IsTenFootInterface"|Returns true if the client is using the ten foot interface, which is a special version of Roblox's UI, exclusive to consoles.

This is the only guaranteed way to verify if the user is on a console or not.|/RMD|

voidRemoveSelectionGroup ( string selectionName )

Removes a group that was created with AddSelectionParent or AddSelectionTuple.

|RMD member="API:Class/GuiService/RemoveSelectionGroup"|Removes a group that was created with AddSelectionParent or AddSelectionTuple.|/RMD|
intGetResolutionScale ( ) [LocalUserSecurity]

Returns the scale of the user's resolution.

|RMD member="API:Class/GuiService/GetResolutionScale"|Returns the scale of the user's resolution.|/RMD|
voidSetUiMessage ( UiMessageType msgType, string uiMessage ) [LocalUserSecurity]

Sets the GuiService's Ui message.

|RMD member="API:Class/GuiService/SetUiMessage"|Sets the GuiService's Ui message.|/RMD|
AddSelectionParent ( string selectionName, GuiObject selectionParent )
Creates a gui selection group where gamepad gui navigation will only consider selectable gui objects that are within the group (children of selectionParent).
AddSelectionTuple ( string selectionName, Tuple<GuiObject> selections )
Functions similarly to AddSelectionParent, but you can give it a tuple of Object Icon.pngGuiObjects that you want to be contained in the group.
Returns two Vector2 values representing the offset of user GUIs in pixels from the top right corner of the screen and the bottom right corner of the screen respectively.
Returns true if the client is using the ten foot interface, which is a special version of Roblox's UI, exclusive to consoles. This is the only guaranteed way to verify if the user is on a console or not.
RemoveSelectionGroup ( string selectionName )
Removes a group that was created with AddSelectionParent or AddSelectionTuple.
GetResolutionScale ( ) [LocalUserSecurity]
Returns the scale of the user's resolution.
SetUiMessage ( UiMessageType msgType, string uiMessage ) [LocalUserSecurity]
Sets the GuiService's Ui message.


Events

Events [toggle]

MenuClosed ( )

Fires when the user closes the ROBLOX coregui escape menu.

|RMD member="API:Class/GuiService/MenuClosed"|Fires when the user closes the ROBLOX coregui escape menu.|/RMD|
MenuOpened ( )

Fires when the user opens the ROBLOX coregui escape menu.

|RMD member="API:Class/GuiService/MenuOpened"|Fires when the user opens the ROBLOX coregui escape menu.|/RMD|
Fires when the user closes the ROBLOX coregui escape menu.
Fires when the user opens the ROBLOX coregui escape menu.

|RMD member="API:Class/GuiService"|The GuiService is a special service, which currently allows developers to control what GuiObject is currently being selected by the Gamepad Gui navigator, and allows clients to check if Roblox's main menu is currently open. This service has a lot of hidden members, which are mainly used internally by Roblox's CoreScripts. |/RMD|