TruWorlds

Players

Inherits: GameSystem

Players is a game system that manages players connected to the server.

Properties

LocalPlayer Instance? read-only

The local player instance representing the Player associated with the client.

RespawnTime float

Seconds before a dead player's character is automatically respawned by the server.

Functions

CreateCharacterControllerForPlayer(player: Player)

Creates a character controller for the given player.

player
The player to create the character controller for.
GetPlayerFromCharacter(instance: Instance) Returns Player?
GetPlayers() Returns Player[]

Signals

PlayerAdded Player

A signal that is emitted when a player is added to the server, providing the added Player as an argument.

PlayerRemoved Player

A signal that is emitted when a player is removed from the server, providing the removed Player as an argument.