Players
Players : Instance
Properties
CharacterAutoLoads
bool
When the character is in a Dead state, decide if you want to respawn again.
Code Samples
UseStrafingAnimations
bool
Determines whether to use the strafingAnimation animation. If enabled, the character can move forward or backward while keeping the field of view fixed to the front.
Code Samples
LocalPlayer
Player
Represents the current client's player.
Code Samples
RespawnTime
number
RespawnTime controls the amount of time taken for a player's character to respawn.
Code Samples
Methods
GetPlayerFromCharacter
The GetPlayerFromCharacter
method retrieves the Player
instance associated with a given Model
representing a player's character. This is useful for identifying the player controlling a character in the game world.
Parameters
Model
InCharacter
Return
Player
Code Samples
GetPlayers
This method returns an array containing all currently connected players in the game. Each player is represented as a Player
object, which provides access to various player-specific information and attributes. This is useful for iterating over players or performing operations on all players at once.
Parameters
Return
array
Code Samples
Events
PlayerAdded
This event is triggered whenever a new player joins the game. It allows developers to listen for and respond to player join events, such as initializing player-specific data or setting up the playerβs initial state.
Parameters
Code Samples
PlayerRemoving
This event is triggered whenever a player is about to leave the game. It allows developers to listen for and respond to player leave events, such as saving player-specific data or cleaning up resources associated with the player.
Parameters
Code Samples
Last updated