We use cookies on this site to enhance your user experience

Players

Players

The Players game service contains only Player objects of players who are presently connected to a Roblox game server. It also contains information about a place’s configuration (such as bubble chat or classic chat). It can fetch information about players not connected to the server, such as character appearances, friends and avatar thumbnail.

Properties

Name Type Description
bool

Indicates whether or not bubble chat is enabled. It is set with the Players/SetChatStyle method.

bool

Indicates whether Characters will respawn automatically.

bool

Indicates whether or not classic chat is enabled. This property is set by the Players/SetChatStyle method.

Instance

The Player that the LocalScript is running for.

int

The maximum amount of players that can be in this server.

int

Players/MaxPlayers for internal use.

int

The preferred amount of players for this server.

int

Players/PreferredPlayers for internal use.

Inherited from Instance

Archivable ClassName DataCost Name Parent RobloxLocked

Functions

Name Type Description
void

Makes the local player chat the given message.

Instance

Used by the game to create the LocalPlayer.

Instance

Returns a Model containing the assets which the player is wearing, excluding gear.

Dictionary

Returns information about the character appearance of a given user.

Instance

Returns a FriendPages object which contains information for all of the given player’s friends.

string

Returns the name of a user with the specified userId. This function will error if the user does not exist, so it should be wrapped in a pcall.

Instance

Returns the player with the specified userId, or nil if that player is not in the game.

Instance

Returns the Player associated with the given character, or nil if the character is not controlled by a player.

Objects

Returns a table of all presently connected Player objects

int64

Sends a query to the Roblox website for the user ID of an account with a given username.

Tuple

Returns the content URL of a user thumbnail based on the specified parameters, and a bool describing if the image is ready to be used or not.

void

Attempts to report the given player for the given reason.

void

Sets whether BubbleChat and ClassicChat are being used, and tells TeamChat and Chat what to do.

void

Makes the LocalPlayer chat the given message, which will only be viewable by users on the same team.

void

Delivers the given message to a recipient without anyone else seeing.

Inherited from Instance

ClearAllChildren Clone Destroy FindFirstAncestor FindFirstAncestorOfClass FindFirstAncestorWhichIsA FindFirstChild FindFirstChildOfClass FindFirstChildWhichIsA GetChildren GetDebugId GetDescendants GetFullName GetPropertyChangedSignal IsA IsAncestorOf IsDescendantOf WaitForChild

Events

Name Type Description

Fires when a player enters the game.

Fired when a player chats.

If the chat type is a Whisper Chat, the targetPlayer is the player being whispered to.

Fired when a player is connecting to the game.

Fired when a player is disconnecting from the game.

Fired when a player rejoins a game session after having disconnected prior.

Fires when a player is about to leave the game.

Inherited from Instance

AncestryChanged Changed ChildAdded ChildRemoved DescendantAdded DescendantRemoving