Skip to content
Roblox API Reference

GuiService

Offers numerous properties and methods for working with GuiObjects, player preferences, and other UI‑related tasks.
  • Not creatable
  • Not replicated
  • Service
Memory category
Instances
Own members
112
Inherited members
75
Subclasses
0
Siblings
608

Properties48

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Defined byGuiService25

Property categoryData

  • GuiService.AutoSelectGuiEnabled: boolean
    If activated, the Select button on a gamepad or Backslash will automatically set a GUI as the selected object.
    • Capabilities: Input + UI
  • GuiService.CoreEffectFolder: Folder
    • Hidden
    • Not replicated
    • Roblox script security
    • Read capabilities: UI
  • GuiService.CoreGuiFolder: Folder
    • Hidden
    • Not replicated
    • Roblox script security
    • Read capabilities: UI
  • GuiService.CoreGuiNavigationEnabled: boolean
    Toggles whether or not objects in the CoreGui can be navigated using a gamepad.
    • Hidden
    • Not replicated
    • Capabilities: Input + UI
  • GuiService.CoreUISafeAreaInsetBottomRight: Vector2
    • Hidden
    • Not scriptable
    • Read only
    • Roblox engine security
    • Read capabilities: UI
  • GuiService.CoreUISafeAreaInsetTopLeft: Vector2
    • Hidden
    • Not scriptable
    • Read only
    • Roblox engine security
    • Read capabilities: UI
  • GuiService.DisplayScalingMode: Enum.DisplayScalingMode
    • Hidden
    • Roblox script security
    • Read capabilities: UI
  • GuiService.FullscreenViewport: Rect
    • Hidden
    • Not scriptable
    • Read only
    • Roblox engine security
    • Read capabilities: UI
  • GuiService.GuiNavigationEnabled: boolean
    Used to enable and disable the default controller GUI navigation.
    • Capabilities: Input + UI
  • GuiService.HardwareSafeAreaInsetBottomRight: Vector2
    • Hidden
    • Not scriptable
    • Read only
    • Roblox engine security
    • Read capabilities: UI
  • GuiService.HardwareSafeAreaInsetTopLeft: Vector2
    • Hidden
    • Not scriptable
    • Read only
    • Roblox engine security
    • Read capabilities: UI
  • GuiService.MenuIsOpen: boolean
    Returns true if any menu of CoreGui is open.
    • Read only
    • Read capabilities: UI
    • Save only
  • GuiService.PreferredTextSize: Enum.PreferredTextSize
    Gets the player's preferred text size as an PreferredTextSize value.
    • Read only
    • Read capabilities: UI
  • GuiService.PreferredTransparency: number
    Gets the player's preferred transparency as a number between 0 and 1.
    • Hidden
    • Read only
    • Read capabilities: UI
  • GuiService.ReducedMotionEnabled: boolean
    Returns true if the player has enabled reduced motion.
    • Hidden
    • Read only
    • Read capabilities: UI
  • GuiService.ScreenContextRawScreenScale: number
    • Hidden
    • Not scriptable
    • Read only
    • Roblox engine security
    • Read capabilities: UI
  • GuiService.ScreenContextTopbarInset: Rect
    • Hidden
    • Not scriptable
    • Read only
    • Roblox engine security
    • Read capabilities: UI
  • GuiService.SelectedCoreObject: GuiObject
    • Hidden
    • Not replicated
    • Roblox script security
    • Read capabilities: UI
  • GuiService.SelectedObject: GuiObject
    Sets the GuiObject currently being focused on by the GUI navigator.
    • Capabilities: Input + UI
  • GuiService.TopbarInset: Rect
    Used to determine the absolute size and position of unobstructed area within top bar space.
    • Read only
    • Read capabilities: UI
  • GuiService.TouchControlsEnabled: boolean
    Used to enable and disable touch controls and touch control display UI. Defaults to true.
    • Capabilities: Input + UI
  • GuiService.ViewportDisplaySize: Enum.DisplaySize
    Read-only property which represents the physical rendering size of the viewport.
    • Read only
    • Read capabilities: UI
  • GuiService.ViewportSizeInMM: Vector2
    • Read only
    • Roblox script security
    • Read capabilities: UI
  • GuiService.IsModalDialog: boolean
    Deprecated: This item is deprecated. Do not use it for new work.
    Indicates whether a modal dialog is visible.
    • Deprecated
    • Read only
    • Read capabilities: UI
  • GuiService.IsWindows: boolean
    Deprecated: This item is deprecated. Do not use it for new work.
    Indicates whether the user is playing on a computer running Windows.
    • Deprecated
    • Read only
    • Read capabilities: UI

Methods106

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byGuiService64
  • GuiService:AddCenterDialog(dialog: Instance,centerDialogType: Enum.CenterDialogType,showFunction: (...any) -> ...any,hideFunction: (...any) -> ...any,)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    dialog: Instance
    centerDialogType: Enum.CenterDialogType
    showFunction: (...any) -> ...any
    hideFunction: (...any) -> ...any
  • GuiService:AddKey(key: string)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    key: string
  • GuiService:AddSpecialKey(key: Enum.SpecialKey)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    key: Enum.SpecialKey
  • GuiService:BroadcastNotification(data: string, notificationType: number)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    data: string
    notificationType: number
  • GuiService:ClearError()
    • Roblox script security
    • Capabilities: UI
  • GuiService:CloseInspectMenu()
    Closes the avatar inspection menu, if open.
    • Capabilities: UI
  • GuiService:CloseStatsBasedOnInputString(input: string): boolean
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    input: string
    Returns
    Type
    boolean
  • GuiService:DismissNotification(notificationId: string): boolean
    Dismisses a notification previously shown by SendNotification().
    • Capabilities: UI
    Parameters
    ParameterDescription
    notificationId: string
    The identifier returned by SendNotification() for the notification to dismiss.
    Returns
    TypeDescription
    boolean
    true if a matching notification was found and dismissed; false if no active notification has the given notificationId.
  • GuiService:ForceTenFootInterface(isForced: boolean)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    isForced: boolean
  • GuiService:GetAutoUIScaleHundredths(): number
    • Roblox script security
    • Capabilities: UI
    Returns
    Type
    number
  • GuiService:GetBrickCount(): number
    • Roblox script security
    • Capabilities: UI
    Returns
    Type
    number
  • GuiService:GetClosestDialogToPosition(position: Vector3): Instance
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    position: Vector3
    Returns
    Type
    Instance
  • GuiService:GetClosestVisibleDialogToPosition(position: Vector3): Dialog
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    position: Vector3
    Returns
    Type
    Dialog
  • GuiService:GetEffectiveUIScaleHundredths(): number
    • Roblox script security
    • Capabilities: UI
    Returns
    Type
    number
  • GuiService:GetEmotesMenuOpen(): boolean
    Checks if the player emotes menu is open.
    • Capabilities: UI
    Returns
    TypeDescription
    boolean
    Whether the emotes menu is open.
  • GuiService:GetErrorCode(): Enum.ConnectionError
    • Roblox script security
    • Capabilities: UI
  • GuiService:GetErrorDetails(): { [string]: any }
    • Roblox script security
    • Capabilities: UI
  • GuiService:GetErrorType(): Enum.ConnectionError
    • Roblox script security
    • Capabilities: UI
  • GuiService:GetGameplayPausedNotificationEnabled(): boolean
    Returns whether or not the Player.GameplayPaused notification has been disabled.
    • Capabilities: UI
    Returns
    TypeDescription
    boolean
    Whether or not the Player.GameplayPaused notification has been disabled.
  • GuiService:GetGuiInset(): ...any
    Returns two Vector2 values representing the inset of user GUIs in pixels, from the top‑left corner of the screen and the bottom‑right corner of the screen respectively.
    • Capabilities: UI
    Returns
    TypeDescription
    ...any
    A tuple of two Vector2 values describing the current specified GUI inset.
  • GuiService:GetGuiIsVisible(guiType: Enum.GuiType): boolean
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    guiType: Enum.GuiType
    Returns
    Type
    boolean
  • GuiService:GetHardwareSafeViewport(): Vector2
    • Roblox script security
    • Capabilities: UI
    Returns
    Type
    Vector2
  • GuiService:GetInsetArea(screenInsets: Enum.ScreenInsets): Rect
    Takes an ScreenInsets value and returns a Rect describing the inset region, relative to the CoreUISafeInsets area.
    • Capabilities: UI
    Parameters
    ParameterDescription
    screenInsets: Enum.ScreenInsets
    The ScreenInsets value indicating which inset area to query.
    Returns
    TypeDescription
    Rect
    A Rect of the usable region for the specified ScreenInsets area.
  • GuiService:GetInspectMenuEnabled(): boolean
    Returns whether the avatar inspection menu is enabled.
    • Capabilities: UI
    Returns
    TypeDescription
    boolean
    Whether the avatar inspection menu is enabled.
  • GuiService:GetNotificationTypeList(): { [string]: any }
    • Roblox script security
    • Capabilities: UI
  • GuiService:GetRawScreenScale(): number
    • Roblox script security
    • Capabilities: UI
    Returns
    Type
    number
  • GuiService:GetResolutionScale(): number
    • Roblox script security
    • Capabilities: UI
    Returns
    Type
    number
  • GuiService:GetSafeZoneOffsets(): { [string]: any }
    • Roblox script security
    • Capabilities: UI
  • GuiService:GetScreenResolution(): Vector2
    • Yields
    • Roblox script security
    • Capabilities: UI
    Returns
    Type
    Vector2
  • GuiService:GetUiMessage(): string
    • Roblox script security
    • Capabilities: UI
    Returns
    Type
    string
  • GuiService:InspectPlayerFromHumanoidDescription(humanoidDescription: Instance,name: string,)
    Allows the avatar inspection menu to appear showing the assets listed in a HumanoidDescription object.
    • Capabilities: AvatarAppearance + UI
    Parameters
    ParameterDescription
    humanoidDescription: Instance
    A HumanoidDescription object that contains the assets to show in the inspection menu.
    name: string
    The name of the player being inspected to show in the menu.
  • GuiService:InspectPlayerFromUserId(userId: User)
    Allows the avatar inspection menu to appear showing the user that has the given UserId.
    • Capabilities: AvatarAppearance + UI
    Parameters
    ParameterDescription
    userId: User
    The UserId of the player to inspect.
  • GuiService:InspectPlayerFromUserIdWithCtx(userId: User, ctx: string)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    userId: User
    ctx: string
  • GuiService:IsMemoryTrackerEnabled(): boolean
    • Roblox script security
    • Capabilities: UI
    Returns
    Type
    boolean
  • GuiService:IsTenFootInterface(): boolean
    Returns true if the client is using the ten foot interface, a special version of Roblox's UI exclusive to consoles.
    • Capabilities: UI
    Returns
    TypeDescription
    boolean
    true if the client is using the ten foot interface (console UI mode); false otherwise.
  • GuiService:OnNotificationDisplayed(notificationId: string)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    notificationId: string
  • GuiService:OnNotificationInteraction(notificationId: string,buttonIndex: number,)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    notificationId: string
    buttonIndex: number
  • GuiService:RemoveCenterDialog(dialog: Instance)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    dialog: Instance
  • GuiService:RemoveKey(key: string)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    key: string
  • GuiService:RemoveSpecialKey(key: Enum.SpecialKey)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    key: Enum.SpecialKey
  • GuiService:Select(selectionParent: Instance)
    Sets GuiService.SelectedObject to a child of a provided instance that is the PlayerGui or its descendants.
    • Capabilities: UI
    Parameters
    ParameterDescription
    selectionParent: Instance
    The parent of selection whose descendants are searched.
  • GuiService:SendNotification(notificationInfo: { [string]: any }): string
    Displays a notification described by notificationInfo and returns a unique identifier for it.
    • Capabilities: UI
    Parameters
    ParameterDescription
    notificationInfo: { [string]: any }
    A dictionary describing the notification. Recognized fields are Title (string), Text (string), Icon (string), Buttons (an array of button tables, each with a Text string, a ButtonTypeNotificationButtonType value, and an OnActivated callback), and OnDisplay/OnDismiss callback functions.
    Returns
    TypeDescription
    string
    A unique identifier string for the notification, which can be passed to DismissNotification(). Returns an empty string if the notification could not be queued.
  • GuiService:SendUIOcclusionMetricsForQueryRegion(position: UDim2,size: UDim2,regionName: string,)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    position: UDim2
    size: UDim2
    regionName: string
  • GuiService:SetEmotesMenuOpen(isOpen: boolean)
    Opens or closes the player emotes menu.
    • Capabilities: UI
    Parameters
    ParameterDescription
    isOpen: boolean
    Whether to open (true) or close (false) the emotes menu.
  • GuiService:SetGameplayPausedNotificationEnabled(enabled: boolean)
    Lets you disable the built-in notification when a player's gameplay is paused.
    • Capabilities: UI
    Parameters
    ParameterDescription
    enabled: boolean
    Whether or not the built-in notification GUI is disabled.
  • GuiService:SetGlobalGuiInset(x1: number, y1: number, x2: number, y2: number)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    x1: number
    y1: number
    x2: number
    y2: number
  • GuiService:SetHardwareSafeAreaInsets(left: number,top: number,right: number,bottom: number,)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    left: number
    top: number
    right: number
    bottom: number
  • GuiService:SetInspectMenuEnabled(enabled: boolean)
    Allows you to enable or disable the avatar inspection menu.
    • Capabilities: UI
    Parameters
    ParameterDescription
    enabled: boolean
    A boolean indicating whether to enable or disable the menu.
  • GuiService:SetMenuIsOpen(open: boolean, menuName: string? = "default")
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    open: boolean
    menuName: string? = "default"
  • GuiService:SetPurchasePromptIsShown(isShown: boolean)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    isShown: boolean
  • GuiService:SetSafeZoneOffsets(top: number,bottom: number,left: number,right: number,)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    top: number
    bottom: number
    left: number
    right: number
  • GuiService:SetTopbarInset(topbarInset: Rect)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    topbarInset: Rect
  • GuiService:SetUiMessage(msgType: Enum.UiMessageType,uiMessage: string? = "errorCode",)
    • Local user security
    • Capabilities: UI
    Parameters
    Parameter
    msgType: Enum.UiMessageType
    uiMessage: string? = "errorCode"
  • GuiService:SetUIScaleMultiplier(multiplierHundredths: number)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    multiplierHundredths: number
  • GuiService:ShowStatsBasedOnInputString(input: string): boolean
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    input: string
    Returns
    Type
    boolean
  • GuiService:ToggleFullscreen()
    • Roblox script security
    • Capabilities: UI
  • GuiService:ToggleGuiIsVisibleForCaptures(guiType: Enum.GuiType)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    guiType: Enum.GuiType
  • GuiService:ToggleGuiIsVisibleIfAllowed(guiType: Enum.GuiType)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    guiType: Enum.GuiType
  • GuiService:AddSelectionParent(selectionName: string, selectionParent: Instance)
    Deprecated:
    Creates a selection group where gamepad GUI navigation will only consider selectable objects that are within the group.
    • Deprecated
    • Capabilities: UI
    Parameters
    ParameterDescription
    selectionName: string
    A unique name identifying this selection group.
    selectionParent: Instance
    The GuiObject whose selectable descendants form the navigation group.

    Use SelectionGroup instead.

  • GuiService:AddSelectionTuple(selectionName: string, ...: any)
    Deprecated:
    AddSelectionTuple works similarly to GuiService:AddSelectionParent(), but you can give it a tuple of GuiObject that you want to be contained in the group. Beware that the second argument is not a table, but rather the first of several GuiObject in the tuple. To pass the contents of a table, use unpack/unpack:
    local frame = script.Parent -- Passing various GuiObject individually GuiService:AddSelectionTuple("InventoryButtons", frame.Sort, frame.Trash, frame.Drop) -- Unpacking a table of GuiObject (unpack/table.unpack are equivalent) local inventoryButtons = { frame.Sort, frame.Trash, frame.Drop } GuiService:AddSelectionTuple("InventoryButtons", unpack(inventoryButtons))
    • Deprecated
    • Capabilities: UI
    Parameters
    ParameterDescription
    selectionName: string
    The name of the added selection.
    ...: any
    The selection(s) added.

    Use SelectionGroup instead.

  • GuiService:GetErrorMessage(): string
    • Deprecated
    • Roblox script security
    • Capabilities: UI
    Returns
    Type
    string

    Use GetUiMessage instead.

  • GuiService:OpenBrowserWindow(url: string)
    • Deprecated
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    url: string
  • GuiService:OpenNativeOverlay(title: string, url: string)
    • Deprecated
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    title: string
    url: string
  • GuiService:RemoveSelectionGroup(selectionName: string)
    Deprecated:
    Removes a group that was created with AddSelectionParent() or AddSelectionTuple().
    • Deprecated
    • Capabilities: UI
    Parameters
    ParameterDescription
    selectionName: string
    The name of the selection group to remove.

    Use SelectionGroup instead.

Events32

Inherited fromObject1
Inherited fromInstance9
Defined byGuiService22

Callbacks1

Defined byGuiService1
  • GuiService.SendCoreUiNotification: (title: string, text: string) -> ()
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    title: string
    text: string