Skip to main content

PlayerDefaults

Inherits from Instance

This is a service used for storing the default values of the Player when created.

Not Creatable Service

Summary

Properties

Methods

Details

A service which allows the default of properties in the Player object to be set. When a player enters the server, each property of the player object is set to the current value of the corresponding property in PlayerDefaults.

You can also set the ChatColor of the player using this service.

Additionally, you may add the following objects to this service:

  • A LocalScript which will run a script for each player

  • A Backpack which will store all the starting tools of the player


Properties

ChatColor

PlayerDefaults.ChatColor: Color=

Parameters:

ParameterTypeDefaultDescription
255any-
255any-
255any-

Determines the default color of players' usernames in chat.


JumpPower

PlayerDefaults.JumpPower: float=36

Determines how high the player jumps by default.


MaxHealth

PlayerDefaults.MaxHealth: float=100

Determines the default maximum health of players.


MaxStamina

PlayerDefaults.MaxStamina: float=3

Determines the default maximum stamina of players.


RespawnTime

PlayerDefaults.RespawnTime: float=5

Determines the default of how long it takes between player's death and respawn.


SprintSpeed

PlayerDefaults.SprintSpeed: float=25

Determines the default sprint speed of players.


Stamina

PlayerDefaults.Stamina: float=0

Determines the default stamina of players.


StaminaEnabled

PlayerDefaults.StaminaEnabled: bool=true

Determines whether or not stamina is enabled by default for players.


StaminaRegen

PlayerDefaults.StaminaRegen: float=1.2

Determines the default rate at which stamina regenerates after being depleted for players.


WalkSpeed

PlayerDefaults.WalkSpeed: float=16

Determines how fast the player walks by default.


Methods

LoadDefaults

PlayerDefaults:LoadDefaults(player: Player)

Parameters:

ParameterTypeDefaultDescription
playerPlayer-

Resets the specified player back to their default values.

Properties