Properties
int
[ReadOnly]
[NotReplicated]
|
Describes the player’s account age in days. |
bool
|
Determines whether the character of a player using a mobile device will automatically jump upon hitting an obstacle. |
float
|
The maximum distance the player’s camera is allowed to zoom out. |
float
|
The minimum distance the player’s camera is allowed to zoom in. |
CameraMode
|
Changes the camera’s mode to either first or third person. |
bool
|
Determines whether the character’s appearance will be loaded when the player spawns. If false, the player will spawn with a default appearance. |
Model
|
A |
string
[NotBrowsable]
[Deprecated]
|
The URL of the asset containing the character’s appearance, clothing, and gear |
int64
|
Determines the user ID of the account whose character appearance is used for a player’s |
int
[ReadOnly]
[NotReplicated]
[Deprecated]
|
The total amount of data currently being stored in the |
int
[NotReplicated]
[Deprecated]
|
The maximum amount of data that can be stored to a |
bool
[ReadOnly]
[NotReplicated]
[Deprecated]
|
Indicates when the player’s data is available to load |
DevCameraOcclusionMode
|
Sets how the default camera handles objects between the camera and the player. |
DevComputerCameraMovementMode
|
Determines player’s camera movement mode when using a desktop version of Roblox. |
DevComputerMovementMode
|
Determines player’s character movement mode when using a desktop version of Roblox. |
bool
|
Determines if the player can toggle mouse lock |
DevTouchCameraMovementMode
|
Determines player’s camera movement mode when using a touch device. |
DevTouchMovementMode
|
Determines player’s character movement mode when using a touch device. |
string
|
The DisplayName of the UserId associated with the Player |
int64
[ReadOnly]
[NotReplicated]
|
Describes the user ID of the player who was followed into a game by a player. |
bool
|
Whether player client-side gameplay is currently paused |
float
|
Sets the distance at which this player will see other Humanoid’s health bars. If set to 0, the health bars will not be displayed. |
string
[Hidden]
[ReadOnly]
[NotReplicated]
|
This property shows the locale id that the local player has set for their Roblox account |
float
[NotReplicated]
|
The maximum value a Player’s |
MembershipType
[ReadOnly]
[NotReplicated]
|
Describes the account’s membership type. |
float
|
Sets the distance at which this player will see other Humanoid’s names. If set to 0, names are hidden. |
bool
|
Determines whether the player is on a specific team. |
Instance
|
Sets the part to focus replication around |
SpawnLocation
|
If set, the player will respawn at the given |
float
|
The simulation radius of a Player’s |
Team
[NotReplicated]
|
Determines the Team with which a Player is associated. |
BrickColor
|
Determines the Team with which a Player is associated. |
int64
|
A unique identifying integer assigned to all user accounts |
int64
[Deprecated]
|
bool
|
Determines if an |
string
[ReadOnly]
[NotReplicated]
|
A read-only string representing the class this |
int
[ReadOnly]
[NotReplicated]
[Deprecated]
|
The cost of saving the instance using data persistence. |
string
|
A non-unique identifier of the |
Instance
[NotReplicated]
|
Determines the hierarchical parent of the |
bool
|
A deprecated property that used to protect |
bool
[Hidden]
[NotReplicated]
[Deprecated]
|
string
[ReadOnly]
[NotReplicated]
[Deprecated]
|
Functions
void
|
Removes all accessories and other character appearance objects from a player’s Character. |
float
|
Returns the distance between the character’s head and the given Vector3 point. Returns 0 if the player has no character. |
Array
[Yields]
|
Returns a dictionary of online friends |
Dictionary
|
Returns a dictionary containing information on how the |
Instance
|
Returns the mouse being used by the client. |
int
[Yields]
|
Returns the player’s rank in the group as an integer between 0 and 255, where 0 is a non-member and 255 is the group’s owner. |
string
[Yields]
|
Returns the player’s role in the group as a string, or “Guest” if the player isn’t part of the group. |
bool
|
Returns whether or not the appearance of the player’s character has loaded. |
bool
[Yields]
[Deprecated]
|
Returns whether a player is friends with the specified user |
bool
[Yields]
|
Checks whether a player is a friend of the user with the given |
bool
[Yields]
|
Checks whether a player is a member of a group with the given ID. |
bool
[Deprecated]
|
Returns true if the user is available for Roblox experiments |
void
|
Forcibly disconnect a player from the game, optionally providing a message. |
bool
[Deprecated]
|
Returns a boolean value that was previously saved to the player with |
void
[Yields]
|
Creates a new character for the player, removing the old one. Also clears the player’s |
void
[Deprecated]
|
Places the given instance either in the player’s character, head, or StarterGear based on the instance’s class. |
void
[Yields]
|
Functions similar to |
void
[Yields]
|
Spawns an avatar so it has everything equipped in the passed in |
void
[Deprecated]
|
Used by an ancient data persistence method to load the user’s Data Persistence |
Instance
[Deprecated]
|
Returns an instance that was previously saved to the player with |
double
[Deprecated]
|
Returns a number value that was previously saved to the player |
string
[Deprecated]
|
Returns a string value that was previously saved to the player |
void
|
Causes the player’s character to walk in the given direction until stopped, or interrupted by the player (by using their controls). |
void
|
Removes the player’s character. |
void
[Yields]
|
Requests that the server stream to the player around the specified location |
void
[Deprecated]
|
Used to save a boolean value that can be loaded again at a later time using |
void
[Deprecated]
|
Used by an ancient data persistence method to save the user’s data |
void
[Deprecated]
|
Saves an instance which can be loaded again at a later time |
void
[Deprecated]
|
Saves a number value that can be loaded again at a later time using |
void
[Deprecated]
|
Saves a string value that can be loaded again at a later time |
void
|
Sets the AccountAge of the player. |
void
|
Sets whether or not the player sees filtered chats, rather than normal chats. |
bool
[Yields]
[Deprecated]
|
Used to pause the script until the player’s data is available to manipulate, or until a certain amount of time has elapsed without fetching the player’s data |
bool
[Yields]
[Deprecated]
|
bool
[Deprecated]
|
Instance
[Deprecated]
|
double
[Deprecated]
|
string
[Deprecated]
|
void
[Deprecated]
|
void
[Deprecated]
|
void
[Deprecated]
|
void
[Deprecated]
|
bool
[Yields]
[Deprecated]
|
void
|
This function destroys all of an |
Instance
|
Create a copy of an object and all its descendants, ignoring objects that are not |
void
|
Sets the |
Instance
|
Returns the first ancestor of the |
Instance
|
Returns the first ancestor of the |
Instance
|
Returns the first ancestor of the |
Instance
|
Returns the first child of the |
Instance
|
Returns the first child of the |
Instance
|
Returns the first child of the |
Instance
|
Variant
|
Returns the attribute which has been assigned to the given name |
RBXScriptSignal
|
Returns an event that fires when the given attribute changes |
Dictionary
|
Returns a dictionary of string → variant pairs for each of the |
Objects
|
Returns an array containing all of the |
string
[NotBrowsable]
|
Returns a coded string of the |
Array
[CustomLuaState]
|
Returns an array containing all of the descendants of the instance |
string
|
Returns a string describing the |
RBXScriptSignal
|
Get an event that fires when a given property of an object changes. |
bool
[CustomLuaState]
|
Returns true if an |
bool
|
Returns true if an |
bool
|
Returns true if an |
void
[Deprecated]
|
Sets the object’s Parent to nil, and does the same for all its descendants. |
void
|
Sets the attribute with the given name to the given value |
Instance
[CustomLuaState]
[CanYield]
|
Returns the child of the |
Objects
[Deprecated]
|
Returns an array of the object’s children. |
Instance
[Deprecated]
|
void
[Deprecated]
|
Instance
[Deprecated]
|
Objects
[Deprecated]
|
bool
[Deprecated]
[CustomLuaState]
|
bool
[Deprecated]
|
void
[Deprecated]
|
Events
RBXScriptSignal
|
Fired when a player’s character spawns or respawns. |
RBXScriptSignal
|
Fires when the the full appearance of a |
RBXScriptSignal
|
Fired right before a player’s character is removed. |
RBXScriptSignal
|
Fires when a player chats in-game using Roblox’s provided chat bar. |
RBXScriptSignal
|
Usually fired two minutes after the game engine classes the player as idle. Time is the amount of seconds since this point. |
RBXScriptSignal
|
Fired when the TeleportState of a player changes. |
RBXScriptSignal
|
Fired when the |
RBXScriptSignal
|
Fires when the |
RBXScriptSignal
|
Fires whenever an attribute is changed on the |
RBXScriptSignal
|
Fired immediately after a property of an object changes. |
RBXScriptSignal
|
Fires when an object is parented to this |
RBXScriptSignal
|
Fires when a child is removed from this |
RBXScriptSignal
|
Fires when a descendant is added to the |
RBXScriptSignal
|
Fires immediately before a descendant of the |
RBXScriptSignal
[Deprecated]
|
Code Samples
Leaderstats
This code sample demonstrates the creation of leaderboard stat values in Roblox’s default player list UI. It creates a “Score” leaderstat that starts at 0.