Returns an array of every Player currently in the game.
playersgetPlayersErrors
- VMException read failure -- Failed to read backing memory while executing this method.
The service that keeps track of all players currently in the game.
| Name | Type | Access | Description |
|---|---|---|---|
| LocalPlayer | Instance | read | The Player object for the client running this VM. since 0.2.6-alphaRoblox ↗ |
| RespawnTime | number | read | The delay, in seconds, before a player's character respawns after dying. since 0.2.6-alphaRoblox ↗ |
| PreferredPlayers | number | read | The soft target for the number of players the server should hold. since 0.2.6-alphaRoblox ↗ |
| MaxPlayers | number | read | The maximum number of players the server allows. since 0.2.6-alphaRoblox ↗ |
| UseStrafingAnimations | boolean | read | Whether strafing animations are enabled for characters. since 0.2.6-alphaRoblox ↗ |
| ClassicChat | boolean | read | Whether the classic (legacy) chat system is in use. since 0.2.6-alphaRoblox ↗ |
| CharacterAutoLoads | boolean | read | Whether characters automatically spawn and respawn for players. since 0.2.6-alphaRoblox ↗ |
| BubbleChat | boolean | read | Whether bubble chat is enabled. since 0.2.6-alphaRoblox ↗ |
| BanningEnabled | boolean | read | Whether player banning via the Players API is enabled for this place. since 0.2.6-alphaRoblox ↗ |
| PlayerAdded | Event | read | 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 ↗ |
| PlayerRemoving | Event | read | 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 ↗ |
Returns an array of every Player currently in the game.
playersgetPlayersReturns the Player that owns character, or nil if the model is not a player's character.
playerFromCharacter| character | Instance | The character model to look up. |