PlayerGui

Mostrar obsoleto

*Pronto este contenido estará disponible en tu idioma seleccionado.

No creable
Jugador duplicado

PlayerGui is a container that holds a player's UI. If a ScreenGui is a descendant, then any GuiObject inside of the ScreenGui will be drawn to 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. Note that if Players.CharacterAutoLoads is set to false, the character will not spawn and StarterGui contents will not be copied until Player:LoadCharacter() is called. If StarterGui.ResetPlayerGuiOnSpawn is set to true, then every time the player's character respawns, all of the contents of that player's PlayerGui are cleared and replaced with the contents of StarterGui.

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:


local Players = game:GetService("Players")
local player = Players.LocalPlayer
local playerGui = player.PlayerGui

Resumen

Propiedades

Métodos

Métodos heredados de BasePlayerGui

Propiedades

CurrentScreenOrientation

Solo lectura
No replicado
Leer paralelo

Describes the player's current screen orientation.

ScreenOrientation

Leer paralelo

Sets the preferred screen orientation mode for this player, if on a mobile device.

SelectionImageObject

Leer paralelo

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

Métodos

Eventos