Skip to content

PlayerGui

Supported Class GUI NotCreatable PlayerReplicated

A container that holds a player's UI.

4 Nova members · 2 modern Roblox members not implemented yet

Description

The PlayerGui container stores objects that create the player's GUI. If a ScreenGui is a descendant of PlayerGui, any GuiObject inside that ScreenGui displays on the player's screen. Any LocalScript will also run if it is inserted into a PlayerGui.

When a player first joins the experience, their PlayerGui is automatically inserted into their Player object. When the player's Player.Character spawns for the first time, all of the contents of StarterGui are automatically copied into the player's PlayerGui. If StarterGui.ResetPlayerGuiOnSpawn is set to true, all the contents of a player's PlayerGui are cleared and replaced with the contents of StarterGui every time the player's character respawns.

Note that if Players.CharacterAutoLoads is set to false, the character won't spawn and StarterGui contents won't copy over until Player.LoadCharacterAsync() is called.

If you need to control a player's UI container during playtime, for example to show/hide a specific ScreenGui or any of its children, access it as follows from a LocalScript:

Inheritance

Object → Instance → BasePlayerGui → PlayerGui

Nova inheritance: Instance → BasePlayerGui → PlayerGui

Properties

SelectionImageObject Supported Property Overrides the default selection adornment used for gamepads.
SelectionImageObject: Object

Overrides the default selection adornment used for gamepads. For best results, this should point to a GuiObject.

Roblox reference signature
SelectionImageObject: GuiObject

Roblox documentation

Methods

GetTopbarTransparency Supported Function Deprecated Returns the transparency of the Topbar.
PlayerGui:GetTopbarTransparency(): float

Returns the transparency of the Topbar.

Returns the current transparency of the topbar CoreGui, a value in the range [0, 1] where 0 is completely opaque and 1 is completely transparent. This is the value previously assigned with PlayerGui.SetTopbarTransparency(), and it defaults to 0.5. This method can only be called from a LocalScript; calling it from a server script raises an error.

Roblox documentation

SetTopbarTransparency Supported Function Deprecated Sets the transparency of the top bar.
PlayerGui:SetTopbarTransparency(float transparency)

Sets the transparency of the top bar.

This method sets the transparency of the top bar CoreGui. A value of 0 is completely opaque and a value of 1 is completely transparent. Values outside of the range [0, 1] are clamped. The default transparency of the topbar is 0.5.

Using the StarterGui.SetCore() method with the "TopbarEnabled" option allows you to enable/disable the entire topbar and all of its features (player list, health, etc). By contrast, this method only affects how the top bar is displayed.

Roblox reference signature
PlayerGui:SetTopbarTransparency(transparency: float): null

Roblox documentation

Events

TopbarTransparencyChangedSignal Supported Event Deprecated Fires when the transparency of the Topbar CoreGui changes.
TopbarTransparencyChangedSignal(float transparency)

Fires when the transparency of the Topbar CoreGui changes.

Fires whenever the transparency of the topbar CoreGui changes, such as after a call to PlayerGui.SetTopbarTransparency(). The event passes the new transparency as its transparency argument, a value in the range [0, 1]. It only fires when the clamped transparency differs from the previous value, so setting the same value again does not re-fire it.

Roblox reference signature
TopbarTransparencyChangedSignal(transparency: float)

Roblox documentation

Inherited members

Inherited from BasePlayerGui: 8 properties, 36 methods, 7 events. They are documented on the base class page.

2 modern Roblox member(s) are not implemented yet — expand to inspect

Members declared by Roblox's PlayerGui class (or by a missing base class) that Nova does not expose. Use this list to scope a migration; the compatibility guide has the recommended workaround.

Properties

Member Signature Status Notes Flags
CurrentScreenOrientation CurrentScreenOrientation: ScreenOrientation Not yet Describes the player's current screen orientation. ReadOnly, NotReplicated
ScreenOrientation ScreenOrientation: ScreenOrientation Not yet Sets the preferred screen orientation mode for this player, if on a mobile device. —

Roblox reference: PlayerGui

Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.