Class

Players

since 0.2.6-alpha

The service that keeps track of all players currently in the game.

InheritsInstance

Properties

11
NameTypeAccessDescription
LocalPlayerInstanceread

The Player object for the client running this VM.

since 0.2.6-alphaRoblox ↗
RespawnTimenumberread

The delay, in seconds, before a player's character respawns after dying.

since 0.2.6-alphaRoblox ↗
PreferredPlayersnumberread

The soft target for the number of players the server should hold.

since 0.2.6-alphaRoblox ↗
MaxPlayersnumberread

The maximum number of players the server allows.

since 0.2.6-alphaRoblox ↗
UseStrafingAnimationsbooleanread

Whether strafing animations are enabled for characters.

since 0.2.6-alphaRoblox ↗
ClassicChatbooleanread

Whether the classic (legacy) chat system is in use.

since 0.2.6-alphaRoblox ↗
CharacterAutoLoadsbooleanread

Whether characters automatically spawn and respawn for players.

since 0.2.6-alphaRoblox ↗
BubbleChatbooleanread

Whether bubble chat is enabled.

since 0.2.6-alphaRoblox ↗
BanningEnabledbooleanread

Whether player banning via the Players API is enabled for this place.

since 0.2.6-alphaRoblox ↗
PlayerAddedEventread

Fires when a new player joins the server. This event is polled around 4 times per second. Connect to this event after iterating the initial player list, else you may double-initialize state.

since 1.8.3-freeRoblox ↗
PlayerRemovingEventread

Fires after a player leaves the server. The Player object passed is still valid for cached field reads (Name, UserId), however any other operation is illegal, risky and writes are not available on it.

since 1.8.3-freeRoblox ↗

Methods

2

#Players:GetPlayers() → { Player }

since 0.2.6-alpha

Returns an array of every Player currently in the game.

AliasesplayersgetPlayers

Errors

  • VMException read failure -- Failed to read backing memory while executing this method.

#Players:GetPlayerFromCharacter(character: Instance) → Player?

since 0.2.6-alpha

Returns the Player that owns character, or nil if the model is not a player's character.

AliasesplayerFromCharacter

Parameters

characterInstance

The character model to look up.

Errors

  • VMException read failure -- Failed to read backing memory while executing this method.