GuiServiceクラス

クラスサービス(game:GetService("GuiService")で取り出す)Instance.newでは作れない日本語解説は準備中

ひとことで言うと

GuiServiceは、ロブロックス(Roblox)のクラスです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。

公式の説明(英語):Offers numerous properties and methods for working with Class.GuiObject|GuiObjects, player preferences, and other UI‑related tasks.

クラスの関係

受け継いでいるクラス:Object → Instance → GuiService

プロパティ(8)

名前と書き方説明
AutoSelectGuiEnabled
GuiService.AutoSelectGuiEnabled: boolean
If activated, the <kbd>Select</kbd> button on a gamepad or <kbd>Backslash</kbd> will automatically set a GUI as the selected object.
GuiNavigationEnabled
GuiService.GuiNavigationEnabled: boolean
Used to enable and disable the default controller GUI navigation.
PreferredTextSize
GuiService.PreferredTextSize: PreferredTextSize
Gets the player's preferred text size as an PreferredTextSize value.
SelectedObject
GuiService.SelectedObject: GuiObject
Sets the GuiObject currently being focused on by the GUI navigator.
TopbarInset
GuiService.TopbarInset: Rect
Used to determine the absolute size and position of unobstructed area within top bar space.
TouchControlsEnabled
GuiService.TouchControlsEnabled: boolean
Used to enable and disable touch controls and touch control display UI. Defaults to true.
ViewportDisplaySize
GuiService.ViewportDisplaySize: DisplaySize
Read-only property which represents the physical rendering size of the viewport.

メソッド(14)

名前と書き方説明
CloseInspectMenu
GuiService:CloseInspectMenu(): ()
Closes the avatar inspection menu, if open.
DismissNotification
GuiService:DismissNotification(notificationId: string): boolean
Dismisses a notification previously shown by Class.GuiService:SendNotification()|SendNotification().
GetEmotesMenuOpen
GuiService:GetEmotesMenuOpen(): boolean
Checks if the player emotes menu is open.
GetGameplayPausedNotificationEnabled
GuiService:GetGameplayPausedNotificationEnabled(): boolean
Returns whether or not the Player.GameplayPaused notification has been disabled.
GetGuiInset
GuiService:GetGuiInset(): Tuple
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.
GetInsetArea
GuiService:GetInsetArea(screenInsets: ScreenInsets): Rect
Takes an ScreenInsets value and returns a Rect describing the inset region, relative to the Enum.ScreenInsets.CoreUISafeInsets|CoreUISafeInsets area.
GetInspectMenuEnabled
GuiService:GetInspectMenuEnabled(): boolean
Returns whether the avatar inspection menu is enabled.
InspectPlayerFromHumanoidDescription
GuiService:InspectPlayerFromHumanoidDescription(humanoidDescription: Instance, name: string): ()
Allows the avatar inspection menu to appear showing the assets listed in a HumanoidDescription object.
InspectPlayerFromUserId
GuiService:InspectPlayerFromUserId(userId: User): ()
Allows the avatar inspection menu to appear showing the user that has the given Class.Player.UserId|UserId.
Select
GuiService:Select(selectionParent: Instance): ()
Sets GuiService.SelectedObject to a child of a provided instance that is the PlayerGui or its descendants.
SendNotification
GuiService:SendNotification(notificationInfo: Dictionary): string
Displays a notification described by notificationInfo and returns a unique identifier for it.
SetEmotesMenuOpen
GuiService:SetEmotesMenuOpen(isOpen: boolean): ()
Opens or closes the player emotes menu.
SetGameplayPausedNotificationEnabled
GuiService:SetGameplayPausedNotificationEnabled(enabled: boolean): ()
Lets you disable the built-in notification when a player's gameplay is paused.
SetInspectMenuEnabled
GuiService:SetInspectMenuEnabled(enabled: boolean): ()
Allows you to enable or disable the avatar inspection menu.

イベント(2)

名前と書き方説明

受け継いでいるメンバー

Instance から受け継いでいるもの(46)

Archivable・Capabilities・IsInSandbox・Name・Parent・PredictionMode・Sandboxed・AddTag・ClearAllChildren・Clone・Destroy・FindFirstAncestor・FindFirstAncestorOfClass・FindFirstAncestorWhichIsA・FindFirstChild・FindFirstChildOfClass・FindFirstChildWhichIsA・FindFirstDescendant・GetActor・GetAttribute・GetAttributeChangedSignal・GetAttributes・GetChildren・GetDebugId・GetDescendants・GetFullName・GetStyled・GetStyledPropertyChangedSignal・GetTags・HasTag・IsAncestorOf・IsDescendantOf・IsPropertyModified・QueryDescendants・RemoveTag・ResetPropertyToDefault・SetAttribute・WaitForChild・AncestryChanged・AttributeChanged・ChildAdded・ChildRemoved・DescendantAdded・DescendantRemoving・Destroying・StyledPropertiesChanged

Object から受け継いでいるもの(4)

ClassName・GetPropertyChangedSignal・IsA・Changed

英語の説明とメンバーの一覧は、Roblox Creator Documentation(GuiService)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。沖縄マイクラ部 クロスウェーブで、ロブロックス(Roblox)・マインクラフト(マイクラ)・Scratchなどのプログラミングを指導。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにロブロックス(Roblox)やマインクラフト(マイクラ)のプログラミングを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む