API:Class/Player

Uncreatable: This object cannot be created with Instance.new.

Player icon.pngPlayer : Object Icon.pngInstance

Represents a user in-game. A player object is added to the Players service when a player joins a game server, and is removed when the player leaves the server.

Properties

PropertiesmemberhiddenProperties [toggle]

intAccountAge [readonly]

The age of a player's account in days.

|RMD member="API:Class/Player/AccountAge"|The age of a player's account in days.|/RMD|
boolAutoJumpEnabled

Sets whether the character will automatically jump when hitting an obstacle on a mobile device.

|RMD member="API:Class/Player/AutoJumpEnabled"|Sets whether the character will automatically jump when hitting an obstacle on a mobile device.|/RMD|
floatCameraMaxZoomDistance

The maximum distance the player's camera is allowed to zoom out.

|RMD member="API:Class/Player/CameraMaxZoomDistance"|The maximum distance the player's camera is allowed to zoom out.|/RMD|
floatCameraMinZoomDistance

The minimum distance the player's camera is allowed to zoom in.

|RMD member="API:Class/Player/CameraMinZoomDistance"|The minimum distance the player's camera is allowed to zoom in.|/RMD|
CameraModeCameraMode

Changes the camera's mode to either first or third person.

|RMD member="API:Class/Player/CameraMode"|Changes the camera's mode to either first or third person.|/RMD|
boolCanLoadCharacterAppearance

Determines whether the character's appearance will be loaded when the player spawns. If false, the player will spawn with a default appearance.

|RMD member="API:Class/Player/CanLoadCharacterAppearance"|Determines whether the character's appearance will be loaded when the player spawns. If false, the player will spawn with a default appearance.|/RMD|
Ref<Model>Character

A model containing the humanoid, arms, legs, torso, and scripts of a player's character. Initially this property is set to nil, and is set when the player's character spawns.

|RMD member="API:Class/Player/Character"|A model containing the humanoid, arms, legs, torso, and scripts of a player's character. Initially this property is set to nil, and is set when the player's character spawns.|/RMD|
intCharacterAppearanceId

The UserId of the account whose character appearance is being used. By default, this is identical to the UserId.

|RMD member="API:Class/Player/CharacterAppearanceId"|The UserId of the account whose character appearance is being used. By default, this is identical to the UserId.|/RMD|
DevCameraOcclusionModeDevCameraOcclusionMode

Sets how the default camera handles objects between the camera and the player.

|RMD member="API:Class/Player/DevCameraOcclusionMode"|Sets how the default camera handles objects between the camera and the player.|/RMD|
DevComputerCameraMovementModeDevComputerCameraMode

Lets developer overwrite the default camera mode for each player if the player is on a computer.

|RMD member="API:Class/Player/DevComputerCameraMode"|Lets developer overwrite the default camera mode for each player if the player is on a computer.|/RMD|
DevComputerMovementModeDevComputerMovementMode

Lets developer overwrite the default movement mode for each player if the player is on a computer.

|RMD member="API:Class/Player/DevComputerMovementMode"|Lets developer overwrite the default movement mode for each player if the player is on a computer.|/RMD|
boolDevEnableMouseLock

Determines if a player can toggle mouse lock by default.

|RMD member="API:Class/Player/DevEnableMouseLock"|Determines if a player can toggle mouse lock by default.|/RMD|
DevTouchCameraMovementModeDevTouchCameraMode

Lets developer overwrite the default camera movement mode for each player if the player is on a mobile device.

|RMD member="API:Class/Player/DevTouchCameraMode"|Lets developer overwrite the default camera movement mode for each player if the player is on a mobile device.|/RMD|
DevTouchMovementModeDevTouchMovementMode

Lets developer overwrite the player's movement mode if the player is on a touch device.

|RMD member="API:Class/Player/DevTouchMovementMode"|Lets developer overwrite the player's movement mode if the player is on a touch device.|/RMD|
intFollowUserId [readonly]

The ID of the user who the player followed into a game. Defaults to 0 if the user didn't follow anyone.

|RMD member="API:Class/Player/FollowUserId"|The ID of the user who the player followed into a game. Defaults to 0 if the user didn't follow anyone.|/RMD|
floatHealthDisplayDistance

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.

|RMD member="API:Class/Player/HealthDisplayDistance"|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.|/RMD|
MembershipTypeMembershipType [readonly]

Holds an Enum of the account's membership type (NBC, BC, TBC and OBC).

|RMD member="API:Class/Player/MembershipType"|Holds an Enum of the account's membership type (NBC, BC, TBC and OBC).|/RMD|
floatNameDisplayDistance

Sets the distance at which this player will see other Humanoid's names. If set to 0, names are hidden.

|RMD member="API:Class/Player/NameDisplayDistance"|Sets the distance at which this player will see other Humanoid's names. If set to 0, names are hidden.|/RMD|
boolNeutral

Determines whether the player is on a specific team or not.

|RMD member="API:Class/Player/Neutral"|Determines whether the player is on a specific team or not.|/RMD|
Ref<SpawnLocation>RespawnLocation

If set, the player will respawn at the given SpawnLocation.

|RMD member="API:Class/Player/RespawnLocation"|If set, the player will respawn at the given SpawnLocation.|/RMD|
Ref<Team>Team

The team which the player is on, or nil if the player is not on a team.

|RMD member="API:Class/Player/Team"|The team which the player is on, or nil if the player is not on a team.|/RMD|
BrickColorTeamColor

Determines which spawns the player uses, and which team the player appears under on the leaderboard.

|RMD member="API:Class/Player/TeamColor"|Determines which spawns the player uses, and which team the player appears under on the leaderboard.|/RMD|
intUserId

A unique identifier for each user.

|RMD member="API:Class/Player/UserId"|A unique identifier for each user.|/RMD|
stringCharacterAppearance [deprecated] [notbrowsable]

Deprecated. Do not use.

|RMD member="API:Class/Player/CharacterAppearance"|Deprecated. Do not use.|/RMD|
intDataComplexity [deprecated] [readonly]

Deprecated. Do not use.

|RMD member="API:Class/Player/DataComplexity"|Deprecated. Do not use.|/RMD|
intDataComplexityLimit [LocalUserSecurity] [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Player/DataComplexityLimit"|Deprecated. Do not use.|/RMD|
boolDataReady [deprecated] [readonly]

Deprecated. Do not use.

|RMD member="API:Class/Player/DataReady"|Deprecated. Do not use.|/RMD|
floatMaximumSimulationRadius [LocalUserSecurity]

The maximum value that the Player's SimulationRadius can grow to.

|RMD member="API:Class/Player/MaximumSimulationRadius"|The maximum value that the Player's SimulationRadius can grow to.|/RMD|
floatSimulationRadius [LocalUserSecurity]

The simulation radius of the Player's Character.

|RMD member="API:Class/Player/SimulationRadius"|The simulation radius of the Player's Character.|/RMD|
intuserId [deprecated]

Deprecated in favor of UserId.

|RMD member="API:Class/Player/userId"|Deprecated in favor of UserId.|/RMD|
AccountAge [readonly]
The age of a player's account in days.
Sets whether the character will automatically jump when hitting an obstacle on a mobile device.
The maximum distance the player's camera is allowed to zoom out.
The minimum distance the player's camera is allowed to zoom in.
Changes the camera's mode to either first or third person.
Determines whether the character's appearance will be loaded when the player spawns. If false, the player will spawn with a default appearance.
A model containing the humanoid, arms, legs, torso, and scripts of a player's character. Initially this property is set to nil, and is set when the player's character spawns.
The UserId of the account whose character appearance is being used. By default, this is identical to the UserId.
Sets how the default camera handles objects between the camera and the player.
Lets developer overwrite the default camera mode for each player if the player is on a computer.
Lets developer overwrite the default movement mode for each player if the player is on a computer.
Determines if a player can toggle mouse lock by default.
Lets developer overwrite the default camera movement mode for each player if the player is on a mobile device.
Lets developer overwrite the player's movement mode if the player is on a touch device.
FollowUserId [readonly]
The ID of the user who the player followed into a game. Defaults to 0 if the user didn't follow anyone.
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.
MembershipType [readonly]
Holds an Enum of the account's membership type (NBC, BC, TBC and OBC).
Sets the distance at which this player will see other Humanoid's names. If set to 0, names are hidden.
Determines whether the player is on a specific team or not.
If set, the player will respawn at the given SpawnLocation.
The team which the player is on, or nil if the player is not on a team.
Determines which spawns the player uses, and which team the player appears under on the leaderboard.
A unique identifier for each user.
CharacterAppearance [deprecated] [notbrowsable]
Deprecated. Do not use.
DataComplexity [deprecated] [readonly]
Deprecated. Do not use.
DataComplexityLimit [LocalUserSecurity] [deprecated]
Deprecated. Do not use.
DataReady [deprecated] [readonly]
Deprecated. Do not use.
MaximumSimulationRadius [LocalUserSecurity]
The maximum value that the Player's SimulationRadius can grow to.
SimulationRadius [LocalUserSecurity]
The simulation radius of the Player's Character.
userId [deprecated]
Deprecated in favor of UserId.
Inherited from Object Icon.pngInstance:
boolArchivable

Determines if an object can be Clone or saved to file.

|RMD member="API:Class/Instance/Archivable"|Determines if an object can be Clone or saved to file.|/RMD|
stringClassName [readonly]

The unique name of this type of Instance.

|RMD member="API:Class/Instance/ClassName"|The unique name of this type of Instance.|/RMD|
stringName

A non-unique identifier for the object.

|RMD member="API:Class/Instance/Name"|A non-unique identifier for the object.|/RMD|
Ref<Instance>Parent

The hierarchical parent of the object.

|RMD member="API:Class/Instance/Parent"|The hierarchical parent of the object.|/RMD|
intDataCost [RobloxPlaceSecurity] [deprecated] [readonly]

Deprecated. Do not use.

|RMD member="API:Class/Instance/DataCost"|Deprecated. Do not use.|/RMD|
boolRobloxLocked [PluginSecurity]

If true, the object and its descendants cannot be indexed or edited by a Script or LocalScript and will throw an error if it is attempted.

|RMD member="API:Class/Instance/RobloxLocked"|If true, the object and its descendants cannot be indexed or edited by a Script or LocalScript and will throw an error if it is attempted.|/RMD|
boolarchivable [deprecated] [hidden]

Deprecated in favor of Archivable.

|RMD member="API:Class/Instance/archivable"|Deprecated in favor of Archivable.|/RMD|
stringclassName [deprecated] [readonly]

Deprecated in favor of ClassName.

|RMD member="API:Class/Instance/className"|Deprecated in favor of ClassName.|/RMD|
Determines if an object can be Clone or saved to file.
ClassName [readonly]
The unique name of this type of Instance.
A non-unique identifier for the object.
The hierarchical parent of the object.
DataCost [RobloxPlaceSecurity] [deprecated] [readonly]
Deprecated. Do not use.
RobloxLocked [PluginSecurity]
If true, the object and its descendants cannot be indexed or edited by a Script or LocalScript and will throw an error if it is attempted.
archivable [deprecated] [hidden]
Deprecated in favor of Archivable.
className [deprecated] [readonly]
Deprecated in favor of ClassName.

Functions

FunctionsmemberhiddenFunctions [toggle]

voidClearCharacterAppearance ( )

Removes all hats, shirts, pants, character meshes, and body colors from the given player's Character.

|RMD member="API:Class/Player/ClearCharacterAppearance"|Removes all hats, shirts, pants, character meshes, and body colors from the given player's Character.|/RMD|
floatDistanceFromCharacter ( Vector3 point )

Returns the distance between the character's head and the given Vector3 point. Returns 0 if the player has no character.

|RMD member="API:Class/Player/DistanceFromCharacter"|Returns the distance between the character's head and the given Vector3 point. Returns 0 if the player has no character.|/RMD|
PlayerMouseGetMouse ( )

Returns the mouse being used by the client.

|RMD member="API:Class/Player/GetMouse"|Returns the mouse being used by the client.|/RMD|
boolHasAppearanceLoaded ( )

Returns whether or not the appearance of the player's character has loaded.

|RMD member="API:Class/Player/HasAppearanceLoaded"|Returns whether or not the appearance of the player's character has loaded.|/RMD|
voidKick ( string message = "" )

Removes a player from the game by disconnecting their client.

|RMD member="API:Class/Player/Kick"|Removes a player from the game by disconnecting their client.|/RMD|
voidLoadCharacterAppearance ( Variant<CharacterAppearance, FaceInstance, DataModelMesh, BackpackItem, Accoutrement> assetInstance )

Places the given instance either in the player's character, head, or StarterGear based on the instance's class.

|RMD member="API:Class/Player/LoadCharacterAppearance"|Places the given instance either in the player's character, head, or StarterGear based on the instance's class.|/RMD|
voidMove ( Vector3 walkDirection, bool relativeToCamera = false )

Causes the player's character to walk in the given direction until stopped, or interrupted by the player (by using their controls).

|RMD member="API:Class/Player/Move"|Causes the player's character to walk in the given direction until stopped, or interrupted by the player (by using their controls).|/RMD|
boolIsUserAvailableForExperiment ( )

Returns true if the user is available for Roblox experiments. The purpose of this function is currently unknown.

|RMD member="API:Class/Player/IsUserAvailableForExperiment"|Returns true if the user is available for Roblox experiments.

The purpose of this function is currently unknown.|/RMD|

boolLoadBoolean ( string key ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Player/LoadBoolean"|Deprecated. Do not use.|/RMD|
voidLoadData ( ) [LocalUserSecurity] [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Player/LoadData"|Deprecated. Do not use.|/RMD|
InstanceLoadInstance ( string key ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Player/LoadInstance"|Deprecated. Do not use.|/RMD|
doubleLoadNumber ( string key ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Player/LoadNumber"|Deprecated. Do not use.|/RMD|
stringLoadString ( string key ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Player/LoadString"|Deprecated. Do not use.|/RMD|
voidRemoveCharacter ( ) [LocalUserSecurity]

Removes the player's character.

|RMD member="API:Class/Player/RemoveCharacter"|Removes the player's character.|/RMD|
voidSaveBoolean ( string key, bool value ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Player/SaveBoolean"|Deprecated. Do not use.|/RMD|
voidSaveData ( ) [LocalUserSecurity] [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Player/SaveData"|Deprecated. Do not use.|/RMD|
voidSaveInstance ( string key, Instance value ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Player/SaveInstance"|Deprecated. Do not use.|/RMD|
voidSaveNumber ( string key, double value ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Player/SaveNumber"|Deprecated. Do not use.|/RMD|
voidSaveString ( string key, string value ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Player/SaveString"|Deprecated. Do not use.|/RMD|
voidSetAccountAge ( int accountAge ) [PluginSecurity]

Sets the AccountAge of the player.

|RMD member="API:Class/Player/SetAccountAge"|Sets the AccountAge of the player.|/RMD|
voidSetSuperSafeChat ( bool value ) [PluginSecurity]

Sets whether or not the player sees filtered chats, rather than normal chats.

|RMD member="API:Class/Player/SetSuperSafeChat"|Sets whether or not the player sees filtered chats, rather than normal chats.|/RMD|
boolloadBoolean ( string key ) [deprecated]

Deprecated in favor of LoadBoolean.

|RMD member="API:Class/Player/loadBoolean"|Deprecated in favor of LoadBoolean.|/RMD|
InstanceloadInstance ( string key ) [deprecated]

Deprecated in favor of LoadInstance.

|RMD member="API:Class/Player/loadInstance"|Deprecated in favor of LoadInstance.|/RMD|
doubleloadNumber ( string key ) [deprecated]

Deprecated in favor of LoadNumber.

|RMD member="API:Class/Player/loadNumber"|Deprecated in favor of LoadNumber.|/RMD|
stringloadString ( string key ) [deprecated]

Deprecated in favor of LoadString.

|RMD member="API:Class/Player/loadString"|Deprecated in favor of LoadString.|/RMD|
voidsaveBoolean ( string key, bool value ) [deprecated]

Deprecated in favor of SaveBoolean.

|RMD member="API:Class/Player/saveBoolean"|Deprecated in favor of SaveBoolean.|/RMD|
voidsaveInstance ( string key, Instance value ) [deprecated]

Deprecated in favor of SaveInstance.

|RMD member="API:Class/Player/saveInstance"|Deprecated in favor of SaveInstance.|/RMD|
voidsaveNumber ( string key, double value ) [deprecated]

Deprecated in favor of SaveNumber.

|RMD member="API:Class/Player/saveNumber"|Deprecated in favor of SaveNumber.|/RMD|
voidsaveString ( string key, string value ) [deprecated]

Deprecated in favor of SaveString.

|RMD member="API:Class/Player/saveString"|Deprecated in favor of SaveString.|/RMD|
Removes all hats, shirts, pants, character meshes, and body colors from the given player's Character.
Returns the distance between the character's head and the given Vector3 point. Returns 0 if the player has no character.
Returns the mouse being used by the client.
Returns whether or not the appearance of the player's character has loaded.
Kick ( string message = "" )
Removes a player from the game by disconnecting their client.
Places the given instance either in the player's character, head, or StarterGear based on the instance's class.
Move ( Vector3 walkDirection, bool relativeToCamera = false )
Causes the player's character to walk in the given direction until stopped, or interrupted by the player (by using their controls).
Returns true if the user is available for Roblox experiments. The purpose of this function is currently unknown.
LoadBoolean ( string key ) [deprecated]
Deprecated. Do not use.
LoadData ( ) [LocalUserSecurity] [deprecated]
Deprecated. Do not use.
LoadInstance ( string key ) [deprecated]
Deprecated. Do not use.
LoadNumber ( string key ) [deprecated]
Deprecated. Do not use.
LoadString ( string key ) [deprecated]
Deprecated. Do not use.
RemoveCharacter ( ) [LocalUserSecurity]
Removes the player's character.
SaveBoolean ( string key, bool value ) [deprecated]
Deprecated. Do not use.
SaveData ( ) [LocalUserSecurity] [deprecated]
Deprecated. Do not use.
SaveInstance ( string key, Instance value ) [deprecated]
Deprecated. Do not use.
SaveNumber ( string key, double value ) [deprecated]
Deprecated. Do not use.
SaveString ( string key, string value ) [deprecated]
Deprecated. Do not use.
SetAccountAge ( int accountAge ) [PluginSecurity]
Sets the AccountAge of the player.
SetSuperSafeChat ( bool value ) [PluginSecurity]
Sets whether or not the player sees filtered chats, rather than normal chats.
loadBoolean ( string key ) [deprecated]
Deprecated in favor of LoadBoolean.
loadInstance ( string key ) [deprecated]
Deprecated in favor of LoadInstance.
loadNumber ( string key ) [deprecated]
Deprecated in favor of LoadNumber.
loadString ( string key ) [deprecated]
Deprecated in favor of LoadString.
saveBoolean ( string key, bool value ) [deprecated]
Deprecated in favor of SaveBoolean.
saveInstance ( string key, Instance value ) [deprecated]
Deprecated in favor of SaveInstance.
saveNumber ( string key, double value ) [deprecated]
Deprecated in favor of SaveNumber.
saveString ( string key, string value ) [deprecated]
Deprecated in favor of SaveString.
Inherited from Object Icon.pngInstance:
voidClearAllChildren ( )

Removes all descendants of the object.

|RMD member="API:Class/Instance/ClearAllChildren"|Removes all descendants of the object.|/RMD|
Ref<Instance>FindFirstAncestor ( string name )

Returns the first ancestor whose Name is equal to name, or nil if none can be found.

|RMD member="API:Class/Instance/FindFirstAncestor"|Returns the first ancestor whose Name is equal to name, or nil if none can be found.|/RMD|
Ref<Instance>FindFirstAncestorOfClass ( string className )

Returns the first ancestor whose ClassName is equal to className, or nil if none can be found.

|RMD member="API:Class/Instance/FindFirstAncestorOfClass"|Returns the first ancestor whose ClassName is equal to className, or nil if none can be found.|/RMD|
Ref<Instance>FindFirstAncestorWhichIsA ( string className )

Returns the first ancestor that inherits the class className, or nil if none can be found.

|RMD member="API:Class/Instance/FindFirstAncestorWhichIsA"|Returns the first ancestor that inherits the class className, or nil if none can be found.|/RMD|
Ref<Instance>FindFirstChild ( string name, bool recursive = false )

Returns the first child found with the given name, or nil if no such child exists. If the optional recursive argument is true, recursively descends the hierarchy while searching rather than only searching the immediate object.

|RMD member="API:Class/Instance/FindFirstChild"|Returns the first child found with the given name, or nil if no such child exists. If the optional recursive argument is true, recursively descends the hierarchy while searching rather than only searching the immediate object.|/RMD|
Ref<Instance>FindFirstChildOfClass ( string className )

Returns the first Instance whose ClassName is equal to className, or nil, if no such object is found with that ClassName.

|RMD member="API:Class/Instance/FindFirstChildOfClass"|Returns the first Instance whose ClassName is equal to className, or nil, if no such object is found with that ClassName.|/RMD|
Ref<Instance>FindFirstChildWhichIsA ( string className, bool recursive = false )

Returns the first child that inherits the class className, or nil if none can be found.

|RMD member="API:Class/Instance/FindFirstChildWhichIsA"|Returns the first child that inherits the class className, or nil if none can be found.|/RMD|
array<Instance>GetChildren ( )

Returns an array of the object's children.

|RMD member="API:Class/Instance/GetChildren"|Returns an array of the object's children.|/RMD|
array<Instance>GetDescendants ( )

Returns an array containing all of the descendants of the instance.

|RMD member="API:Class/Instance/GetDescendants"|Returns an array containing all of the descendants of the instance.|/RMD|
stringGetFullName ( )

Returns a string which shows the object's ancestry chain.

|RMD member="API:Class/Instance/GetFullName"|Returns a string which shows the object's ancestry chain.|/RMD|
RBXScriptSignalGetPropertyChangedSignal ( string property )

Returns a signal that is fired when the specified property is changed on this object.

|RMD member="API:Class/Instance/GetPropertyChangedSignal"|Returns a signal that is fired when the specified property is changed on this object.|/RMD|
boolIsA ( string className )

Returns true if the object is an instance of the given class, or if the object's class inherits from the given class.

|RMD member="API:Class/Instance/IsA"|Returns true if the object is an instance of the given class, or if the object's class inherits from the given class.|/RMD|
boolIsAncestorOf ( Instance descendant )

Returns true if the object is an ancestor of the given descendant.

|RMD member="API:Class/Instance/IsAncestorOf"|Returns true if the object is an ancestor of the given descendant.|/RMD|
boolIsDescendantOf ( Instance ancestor )

Returns true if the object is a descendant of the given ancestor.

|RMD member="API:Class/Instance/IsDescendantOf"|Returns true if the object is a descendant of the given ancestor.|/RMD|
Ref<Instance>WaitForChild ( string childName, double timeOut )

Yields the current thread until a child with the given name is found, then returns the child. If the timeOut parameter is specified, this function will time out and return nil if timeOut seconds elapse without the child being found.

|RMD member="API:Class/Instance/WaitForChild"|Yields the current thread until a child with the given name is found, then returns the child.

If the timeOut parameter is specified, this function will time out and return nil if timeOut seconds elapse without the child being found.|/RMD|

stringGetDebugId ( int scopeLength = 4 ) [PluginSecurity] [notbrowsable]

Returns a coded string of the object's DebugId used internally by Roblox.

|RMD member="API:Class/Instance/GetDebugId"|Returns a coded string of the object's DebugId used internally by Roblox.|/RMD|
array<Instance>children ( ) [deprecated]

Deprecated in favor of GetChildren.

|RMD member="API:Class/Instance/children"|Deprecated in favor of GetChildren.|/RMD|
InstancefindFirstChild ( string name, bool recursive = false ) [deprecated]

Deprecated in favor of FindFirstChild.

|RMD member="API:Class/Instance/findFirstChild"|Deprecated in favor of FindFirstChild.|/RMD|
array<Instance>getChildren ( ) [deprecated]

Deprecated in favor of GetChildren.

|RMD member="API:Class/Instance/getChildren"|Deprecated in favor of GetChildren.|/RMD|
boolisA ( string className ) [deprecated]

Deprecated in favor of IsA.

|RMD member="API:Class/Instance/isA"|Deprecated in favor of IsA.|/RMD|
boolisDescendantOf ( Instance ancestor ) [deprecated]

Deprecated in favor of IsDescendantOf.

|RMD member="API:Class/Instance/isDescendantOf"|Deprecated in favor of IsDescendantOf.|/RMD|
Removes all descendants of the object.
Returns the first ancestor whose Name is equal to name, or nil if none can be found.
Returns the first ancestor whose ClassName is equal to className, or nil if none can be found.
Returns the first ancestor that inherits the class className, or nil if none can be found.
FindFirstChild ( string name, bool recursive = false )
Returns the first child found with the given name, or nil if no such child exists. If the optional recursive argument is true, recursively descends the hierarchy while searching rather than only searching the immediate object.
Returns the first Instance whose ClassName is equal to className, or nil, if no such object is found with that ClassName.
FindFirstChildWhichIsA ( string className, bool recursive = false )
Returns the first child that inherits the class className, or nil if none can be found.
Returns an array of the object's children.
Returns an array containing all of the descendants of the instance.
Returns a string which shows the object's ancestry chain.
Returns a signal that is fired when the specified property is changed on this object.
IsA ( string className )
Returns true if the object is an instance of the given class, or if the object's class inherits from the given class.
IsAncestorOf ( Instance descendant )
Returns true if the object is an ancestor of the given descendant.
Returns true if the object is a descendant of the given ancestor.
WaitForChild ( string childName, double timeOut )
Yields the current thread until a child with the given name is found, then returns the child. If the timeOut parameter is specified, this function will time out and return nil if timeOut seconds elapse without the child being found.
GetDebugId ( int scopeLength = 4 ) [PluginSecurity] [notbrowsable]
Returns a coded string of the object's DebugId used internally by Roblox.
children ( ) [deprecated]
Deprecated in favor of GetChildren.
findFirstChild ( string name, bool recursive = false ) [deprecated]
Deprecated in favor of FindFirstChild.
getChildren ( ) [deprecated]
Deprecated in favor of GetChildren.
isA ( string className ) [deprecated]
Deprecated in favor of IsA.
isDescendantOf ( Instance ancestor ) [deprecated]
Deprecated in favor of IsDescendantOf.

YieldFunctions

YieldFunctionsmemberhiddenYieldFunctions [toggle]

array<dictionary>GetFriendsOnline ( int maxFriends = 200 )

Return a Dictionary of online friends, specified by maxFriends.

|RMD member="API:Class/Player/GetFriendsOnline"|Return a Dictionary of online friends, specified by maxFriends.|/RMD|
intGetRankInGroup ( int groupId )

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.

|RMD member="API:Class/Player/GetRankInGroup"|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.|/RMD|
stringGetRoleInGroup ( int groupId )

Returns the player's role in the group as a string, or "Guest" if the player isn't part of the group.

|RMD member="API:Class/Player/GetRoleInGroup"|Returns the player's role in the group as a string, or "Guest" if the player isn't part of the group.|/RMD|
boolIsFriendsWith ( int userId )

Returns whether a player is friends with the specified user.

|RMD member="API:Class/Player/IsFriendsWith"|Returns whether a player is friends with the specified user.|/RMD|
boolIsInGroup ( int groupId )

Checks whether the player is in the group given in its argument.

|RMD member="API:Class/Player/IsInGroup"|Checks whether the player is in the group given in its argument.|/RMD|
voidLoadCharacter ( )

Creates a new character for the player, removing the old one. Also clears the player's Backpack and PlayerGui.

|RMD member="API:Class/Player/LoadCharacter"|Creates a new character for the player, removing the old one. Also clears the player's Backpack and PlayerGui.|/RMD|
boolIsBestFriendsWith ( int userId ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Player/IsBestFriendsWith"|Deprecated. Do not use.|/RMD|
voidLoadCharacterBlocking ( ) [LocalUserSecurity]

Functions similarly to LoadCharacter, but internally this method does a mutex lock on the DataModel until the character loads.

|RMD member="API:Class/Player/LoadCharacterBlocking"|Functions similarly to LoadCharacter, but internally this method does a mutex lock on the DataModel until the character loads.|/RMD|
boolWaitForDataReady ( ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Player/WaitForDataReady"|Deprecated. Do not use.|/RMD|
boolisFriendsWith ( int userId ) [deprecated]

Deprecated in favor of IsFriendsWith.

|RMD member="API:Class/Player/isFriendsWith"|Deprecated in favor of IsFriendsWith.|/RMD|
boolwaitForDataReady ( ) [deprecated]

Deprecated in favor of WaitForDataReady.

|RMD member="API:Class/Player/waitForDataReady"|Deprecated in favor of WaitForDataReady.|/RMD|
GetFriendsOnline ( int maxFriends = 200 )
Return a Dictionary of online friends, specified by maxFriends.
GetRankInGroup ( int groupId )
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.
GetRoleInGroup ( int groupId )
Returns the player's role in the group as a string, or "Guest" if the player isn't part of the group.
IsFriendsWith ( int userId )
Returns whether a player is friends with the specified user.
IsInGroup ( int groupId )
Checks whether the player is in the group given in its argument.
Creates a new character for the player, removing the old one. Also clears the player's Backpack and PlayerGui.
IsBestFriendsWith ( int userId ) [deprecated]
Deprecated. Do not use.
LoadCharacterBlocking ( ) [LocalUserSecurity]
Functions similarly to LoadCharacter, but internally this method does a mutex lock on the DataModel until the character loads.
WaitForDataReady ( ) [deprecated]
Deprecated. Do not use.
isFriendsWith ( int userId ) [deprecated]
Deprecated in favor of IsFriendsWith.
waitForDataReady ( ) [deprecated]
Deprecated in favor of WaitForDataReady.

Events

EventsmemberhiddenEvents [toggle]

CharacterAdded ( Model character )

Fired when a player's character spawns or respawns.

|RMD member="API:Class/Player/CharacterAdded"|Fired when a player's character spawns or respawns.|/RMD|
CharacterAppearanceLoaded ( Model character )

Fires whenever a character has loaded its appearance.

|RMD member="API:Class/Player/CharacterAppearanceLoaded"|Fires whenever a character has loaded its appearance.|/RMD|
CharacterRemoving ( Model character )

Fired when a player's character is about to be removed.

|RMD member="API:Class/Player/CharacterRemoving"|Fired when a player's character is about to be removed.|/RMD|
Chatted ( string message, Player recipient )

Fired when the connected player chats in-game using the chat bar provided by ROBLOX.

|RMD member="API:Class/Player/Chatted"|Fired when the connected player chats in-game using the chat bar provided by ROBLOX.|/RMD|
Idled ( double time )

Usually fired two minutes after the game engine classes the player as idle. Time is the amount of seconds since this point.

|RMD member="API:Class/Player/Idled"|Usually fired two minutes after the game engine classes the player as idle. Time is the amount of seconds since this point.|/RMD|
OnTeleport ( TeleportState teleportState, int placeId, string spawnName )

Fired when the TeleportState of a player changes.

|RMD member="API:Class/Player/OnTeleport"|Fired when the TeleportState of a player changes.|/RMD|
SimulationRadiusChanged ( float radius ) [LocalUserSecurity]

Fired when the Player's SimulationRadius is changed.

|RMD member="API:Class/Player/SimulationRadiusChanged"|Fired when the Player's SimulationRadius is changed.|/RMD|
CharacterAdded ( Model character )
Fired when a player's character spawns or respawns.
Fires whenever a character has loaded its appearance.
CharacterRemoving ( Model character )
Fired when a player's character is about to be removed.
Chatted ( string message, Player recipient )
Fired when the connected player chats in-game using the chat bar provided by ROBLOX.
Idled ( double time )
Usually fired two minutes after the game engine classes the player as idle. Time is the amount of seconds since this point.
OnTeleport ( TeleportState teleportState, int placeId, string spawnName )
Fired when the TeleportState of a player changes.
SimulationRadiusChanged ( float radius ) [LocalUserSecurity]
Fired when the Player's SimulationRadius is changed.
Inherited from Object Icon.pngInstance:
AncestryChanged ( Instance child, Instance parent )

Fires when the Parent property of the object or one of its ancestors is changed.

|RMD member="API:Class/Instance/AncestryChanged"|Fires when the Parent property of the object or one of its ancestors is changed.|/RMD|
Changed ( string property )

Fires after a property of the object changes.

|RMD member="API:Class/Instance/Changed"|Fires after a property of the object changes.|/RMD|
ChildAdded ( Instance child )

Fires when a child is added to the object.

|RMD member="API:Class/Instance/ChildAdded"|Fires when a child is added to the object.|/RMD|
ChildRemoved ( Instance child )

Fires when a child is removed from the object.

|RMD member="API:Class/Instance/ChildRemoved"|Fires when a child is removed from the object.|/RMD|
DescendantAdded ( Instance descendant )

Fires when a descendant is added to the object.

|RMD member="API:Class/Instance/DescendantAdded"|Fires when a descendant is added to the object.|/RMD|
DescendantRemoving ( Instance descendant )

Fires before a descendant of the object is removed.

|RMD member="API:Class/Instance/DescendantRemoving"|Fires before a descendant of the object is removed.|/RMD|
childAdded ( Instance child ) [deprecated]

Deprecated in favor of ChildAdded.

|RMD member="API:Class/Instance/childAdded"|Deprecated in favor of ChildAdded.|/RMD|
Fires when the Parent property of the object or one of its ancestors is changed.
Changed ( string property )
Fires after a property of the object changes.
Fires when a child is added to the object.
Fires when a child is removed from the object.
DescendantAdded ( Instance descendant )
Fires when a descendant is added to the object.
Fires before a descendant of the object is removed.
childAdded ( Instance child ) [deprecated]
Deprecated in favor of ChildAdded.

|RMD member="API:Class/Player"|Represents a user in-game. A player object is added to the Players service when a player joins a game server, and is removed when the player leaves the server. |/RMD|