62 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

Player

Inherits from: Instance → Object

A Player object is a client that is currently connected. These objects are added to the Players service when a new player connects, then removed when they eventually disconnect from the server.

The Instance.Name property reflects the player's username. When saving information about a player, you should use their UserId since it is possible that a player can change their username.

There are several similar methods in the Players service for working with Player objects. Use these over their respective Instance methods:

Inherits from: Instance

Memory category: Instances

Properties

NameType / ReturnsDescription
Player.AccountAgeintDescribes the player's account age in days.
Player.AgeCheckedAgeCheckStatusIndicates whether the player has completed an age verification check.
Player.AutoJumpEnabledbooleanDetermines whether the character of a player using a mobile device will automatically jump upon hitting an obstacle.
Player.CameraMaxZoomDistancefloatThe maximum distance the player's camera is allowed to zoom out.
Player.CameraMinZoomDistancefloatThe minimum distance the player's camera is allowed to zoom in.
Player.CameraModeCameraModeChanges the camera's mode to either first or third person.
Player.CanLoadCharacterAppearancebooleanDetermines whether the character's appearance will be loaded when the player spawns. If false, the player will spawn with a default appearance.
Player.CharacterModelA Model controlled by the player that contains a Humanoid, body parts, scripts, and other objects.
Player.CharacterAppearancestringThe URL of the asset containing the character's appearance, clothing, and gear.
Player.CharacterAppearanceIdint64Determines the user ID of the account whose character appearance is used for a player's Character.
Player.DataComplexityintThe total amount of data currently being stored in the player's cache on the current place.
Player.DataReadybooleanIndicates when the player's data is available to load.
Player.DevCameraOcclusionModeDevCameraOcclusionModeSets how the default camera handles objects between the camera and the player.
Player.DevComputerCameraModeDevComputerCameraMovementModeDetermines player's camera movement mode when using a device with a mouse and keyboard.
Player.DevComputerMovementModeDevComputerMovementModeDetermines player's character movement mode when using a device with a mouse and keyboard.
Player.DevEnableMouseLockbooleanDetermines if the player can toggle mouse lock.
Player.DevTouchCameraModeDevTouchCameraMovementModeDetermines player's camera movement mode when using a touch-enabled device.
Player.DevTouchMovementModeDevTouchMovementModeDetermines player's character movement mode when using a touch-enabled device.
Player.DisplayNamestringThe display name of the authenticated user associated with the Player.
Player.FollowUserIdint64Describes the user ID of the player who was followed into an experience by a player.
Player.FrustumStreamingFrustumStreamingModeControls the engine's instance streaming behavior for the player's camera view.
Player.GameplayPausedbooleanWhether player client-side gameplay is currently paused.
Player.HasRobloxSubscriptionbooleanIndicates whether the player has an active Roblox subscription.
Player.HasVerifiedBadgebooleanIndicates if a player has a Verified badge.
Player.HealthDisplayDistancefloatSets the distance at which this player will see other players' health bars.
Player.InputLatencyintLatency used by the Server Authority netcode system.
Player.LocaleIdstringThis property shows the locale ID that the local player has set for their Roblox account.
Player.MembershipTypeMembershipTypeDescribes the account's membership type.
Player.NameDisplayDistancefloatSets the distance at which this player will see other players' names.
Player.NeutralbooleanDetermines whether the player is on a specific team.
Player.PartyIdstringA unique identifier of the party a Player belongs to.
Player.ReplicationFocusInstanceSets the part to focus replication around.
Player.RespawnLocationSpawnLocationIf set, the player will respawn at the given SpawnLocation.
Player.StepIdOffsetintOffset between client and server used by the Server Authority system.
Player.TeamTeamDetermines the Team with which the player is associated.
Player.TeamColorBrickColorDetermines the Team with which the player is associated with according to that team's Team.TeamColor.
Player.ThirdPartyTextChatRestrictionStatusChatRestrictionStatusA read-only value reflecting the player's text-chat restriction status as reported by a third-party platform.
Player.UserUserThe User representing this player's domain-scoped identity within the current experience.
Player.UserIdint64A unique identifying integer assigned to all user accounts.
Player.userIdint64

Inherited from Instance

NameType / ReturnsDescription
Instance.ArchivablebooleanDetermines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published.
Instance.archivableboolean
Instance.CapabilitiesSecurityCapabilitiesThe set of capabilities allowed to be used for scripts inside this container.
Instance.IsInSandboxbooleanIndicates whether the instance is inside a sandboxed container.
Instance.NamestringA non-unique identifier of the Instance.
Instance.ParentInstanceDetermines the hierarchical parent of the Instance.
Instance.PredictionModePredictionModeReflects the client-side prediction mode applied to the instance under server-authoritative physics.
Instance.RobloxLockedbooleanA deprecated property that used to protect CoreGui objects.
Instance.SandboxedbooleanWhen enabled, the instance can only access abilities in its Capabilities list.
Instance.UniqueIdUniqueIdA unique identifier for the instance.

Inherited from Object

NameType / ReturnsDescription
Object.ClassNamestringA read-only string representing the class this Object belongs to.
Object.classNamestring

Player.AccountAge

This property describes how long ago a player's account was registered in days. It is set using the SetAccountAge() method, which cannot be accessed by scripts.

FieldValue
typeint
tags["ReadOnly","NotReplicated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Player.AgeChecked

This read-only property holds an AgeCheckStatus value indicating whether the player has completed age verification. The default value is AgeCheckStatus.Unchecked. It transitions to AgeCheckStatus.Checked when the player passes age verification through the Player:PromptAgeCheck() flow.

This property is set by the server and cannot be changed by scripts.

FieldValue
typeAgeCheckStatus
security{"read":"None","write":"RobloxEngineSecurity"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Player.AutoJumpEnabled

This property determines whether the Character of a Player using a mobile device will automatically jump when they hit an obstacle. This can make levels more navigable while on a mobile device.

When the player joins the experience, the StarterPlayer.AutoJumpEnabled value determines the initial state of this property. Then, this property determines the value of the Humanoid.AutoJumpEnabled property of the Character on spawn. In other words, it is possible to set the auto-jump behavior on a per-character, per-player, and per-experience basis using these three properties.

FieldValue
typeboolean
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Code samples: View on Creator Hub (Auto-Jump-Toggle).

Player.CameraMaxZoomDistance

This property sets the maximum distance the player's camera is allowed to zoom out, in studs.

The default value of this property is set by StarterPlayer.CameraMaxZoomDistance. If this value is set to a lower value than CameraMinZoomDistance, it will be increased to CameraMinZoomDistance.

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryCamera
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.CameraMinZoomDistance

This property sets the minimum distance the player's camera is allowed to zoom in, in studs.

The default value of this property is set by StarterPlayer.CameraMinZoomDistance. If this value is set to a higher value than CameraMaxZoomDistance, it will be decreased to CameraMaxZoomDistance.

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryCamera
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.CameraMode

This property sets the player's camera mode, defaulting to third person.

Third Person

In the default third person mode (CameraMode.Classic), the character can be seen in the camera. While in this mode, the default behavior is:

First Person

In first person mode (CameraMode.LockFirstPerson), the player's camera is zoomed all the way in. Unless there is a visible GUI present with the GuiButton.Modal property set to true, moving the mouse, tap-dragging on mobile, or using the secondary thumbstick on a gamepad will rotate the camera around the character.

FieldValue
typeCameraMode
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryCamera
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Code samples: View on Creator Hub (playing-in-first-person).

Player.CanLoadCharacterAppearance

This property determines whether the character's appearance will be loaded when the player spawns. The default value of this property is set by StarterPlayer.LoadPlayerAppearance.

Attempting to set the property after the character has spawned will not change the character; you must call LoadCharacterAsync() to load the new appearance.

FieldValue
typeboolean
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryBehavior
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Player.Character

This property contains a reference to a Model containing a Humanoid, body parts, scripts, and other objects required for simulating the player's avatar in-experience. The model is parented to the Workspace but it may be moved. It is automatically loaded when Players.CharacterAutoLoads is true and it can be manually loaded otherwise using LoadCharacterAsync().

Initially this property is nil and it is set when the player's character first spawns. Use the CharacterAdded event to detect when a player's character properly loads, and the CharacterRemoving event to detect when the character is about to despawn. Avoid using Object:GetPropertyChangedSignal() on this property.

Note that LocalScripts that are cloned from StarterGui or StarterPack into a player's PlayerGui or Backpack respectively are often run before the old character model is replaced, so Player.Character may refer to the old model whose Parent property is nil. Therefore, in a LocalScript under StarterGui or StarterPack, it is advisable to make sure the parent of Character is not nil before using it, for example:

FieldValue
typeModel
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Code samples: View on Creator Hub (Player-Character).

Player.CharacterAppearance

Deprecated. This item is deprecated. Do not use it for new work.

This property indicates the URL of the asset containing the character's appearance, clothing, and gear. It is automatically set by Roblox to load your avatar's appearance when you join an experience.

Attempting to set the property after the character has spawned will not change the character, you must call LoadCharacterAsync() to load the new appearance.

FieldValue
typestring
tags["NotBrowsable","Deprecated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.CharacterAppearanceId

This property determines the user ID of the account whose character appearance is used for a player's Character. By default, this property is the UserId, which uses the player's avatar as they have created it on Roblox.

Changing this property to the user ID of another account will cause the player to spawn with that account's appearance.

You can also toggle whether or not a player's character appearance is loaded in experience by changing the StarterPlayer.LoadCharacterAppearance property.

FieldValue
typeint64
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.DataComplexity

Deprecated. This item is deprecated, as it may have been used for a now obsolete data persistence method. Please save and load player data using DataStoreService for new work.

This property was once used by an ancient data persistence method to indicate the total amount of data currently being stored in the player's cache on the current place.

Notes

FieldValue
typeint
tags["Hidden","ReadOnly","NotReplicated","Deprecated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Player.DataReady

Deprecated. This item is deprecated, as it may have been used for a now obsolete data persistence method. Please save and load player data using DataStoreService for new work.

This property was once used by an ancient data persistence method to indicate when the player's data is available to load. Becomes true when data is available.

FieldValue
typeboolean
tags["Hidden","ReadOnly","NotReplicated","Deprecated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Player.DevCameraOcclusionMode

Defines how the default camera scripts handle objects between the camera and the camera subject. Set by StarterPlayer.DevCameraOcclusionMode and can't be changed for individual players.

The default value is Zoom. See DevCameraOcclusionMode for a list of available modes.

FieldValue
typeDevCameraOcclusionMode
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryCamera
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.DevComputerCameraMode

This property determines the manner in which a player moves their camera when using a device with a mouse and keyboard. This property cannot be set using a LocalScript (it must be set on the server using a Script).

The default value of this property is determined by StarterPlayer.DevComputerCameraMovementMode.

This property doesn't affect players using a TouchEnabled device. See DevTouchCameraMode instead.

FieldValue
typeDevComputerCameraMovementMode
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryCamera
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.DevComputerMovementMode

This property determines the manner in which a player moves their character when using a device with a mouse and keyboard. This property cannot be set using a LocalScript (it must be set on the server using a Script).

The default value of this property is determined by StarterPlayer.DevComputerMovementMode.

This property doesn't affect players using a TouchEnabled device. See DevTouchMovementMode instead.

FieldValue
typeDevComputerMovementMode
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryControl
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.DevEnableMouseLock

This property determines if a player is able to toggle mouse lock by pressing Shift. A player can disable the mouse lock switch in the experience's settings during play. By default, this property is set to the value of StarterPlayer.EnableMouseLockOption. This can be set server-side during runtime by using a Script. It can not be set client-side.

When mouse lock is enabled, the player's cursor is locked to the center of the screen. Moving the mouse will orbit the camera around the player's Character, and the character will face the same direction as the Camera. It also offsets the camera view just over the right shoulder of the player's character.

FieldValue
typeboolean
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryCamera
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.DevTouchCameraMode

This property determines the manner in which a player moves their camera when using a TouchEnabled device. This property cannot be set using a LocalScript (it must be set on the server using a Script).

The default value of this property is determined by StarterPlayer.DevTouchCameraMovementMode.

This property doesn't affect players who aren't using a TouchEnabled device. See DevComputerCameraMode instead.

FieldValue
typeDevTouchCameraMovementMode
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryCamera
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.DevTouchMovementMode

This property determines the manner in which a player moves their character when using a TouchEnabled device. This property cannot be set using a LocalScript (it must be set on the server using a Script).

The default value of this property is determined by StarterPlayer.DevTouchMovementMode.

This property doesn't affect players who aren't using a TouchEnabled device. See DevComputerMovementMode instead.

FieldValue
typeDevTouchMovementMode
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryControl
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.DisplayName

This property contains the display name of the authenticated user associated with the Player object. Unlike UserId, display names are non-unique names a player displays to others.

Usage Notes

FieldValue
typestring
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Player.FollowUserId

This property contains the UserId of the user that a player followed into the experience, or 0 if the player did not follow anyone in. This property is useful for alerting players who have been followed by another player into the experience.

You can get the name of the player followed using this user ID and the Players:GetNameFromUserIdAsync() method.

FieldValue
typeint64
tags["ReadOnly","NotReplicated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":true}
capabilities["Players"]

Code samples: View on Creator Hub (Followed-Alert).

Player.FrustumStreaming

This property controls the engine's instance streaming behavior for the camera view of the given player. Enabled means the player will always stream their camera view. Automatic means the engine will decide to stream the camera view based on the player's capability (based on the bandwidth, device memory, etc.) and gameplay suitability. Disabled means the player will never stream their camera view. Default currently behaves the same as Disabled.

FieldValue
typeFrustumStreamingMode
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Player.GameplayPaused

This property indicates if the player is currently in a pause state in a place with StreamingEnabled activated. It is set on the client but replicated to the server.

See Also

FieldValue
typeboolean
tags["Hidden"]
security{"read":"None","write":"NotAccessibleSecurity"}
thread safetyReadSafe
categoryBehavior
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Player.HasRobloxSubscription

This read-only property is true when the player has an active Roblox subscription (the flagship Roblox membership), and false otherwise. It is set by the server and cannot be changed by scripts.

Use this property instead of Player.MembershipType to check for the Roblox subscription.

FieldValue
typeboolean
security{"read":"None","write":"RobloxEngineSecurity"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Code samples: View on Creator Hub (check-roblox-subscription).

Player.HasVerifiedBadge

This property indicates if the player has a Verified badge.

FieldValue
typeboolean
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Player.HealthDisplayDistance

This property sets the distance in studs at which this player will see other Humanoid health bars. If set to 0, the health bars will not be displayed. This property is set to StarterPlayer.HealthDisplayDistance by default.

If a humanoid's health bar is visible, you can set the display type using Humanoid.DisplayDistanceType.

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryCamera
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.InputLatency

Latency used by the Server Authority netcode system. This property is not accessible through scripts.

FieldValue
typeint
security{"read":"RobloxEngineSecurity","write":"RobloxEngineSecurity"}
thread safetyReadSafe
categoryData
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.LocaleId

This property shows the locale ID that the local player has set for their Roblox account. It holds a string with the two letter code, for example en-us.

See also LocalizationService.RobloxLocaleId, the locale ID used for localizing internal content. This can be a different value when the player's account locale isn't supported for internal content localization.

FieldValue
typestring
tags["Hidden","ReadOnly","NotReplicated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Player.MembershipType

Deprecated. This property is deprecated. Use Player.HasRobloxSubscription to check whether a player has an active Roblox subscription.

This property can only be read from to determine membership (it cannot be set to another membership type). It holds a MembershipType enum of the account's membership type.

FieldValue
typeMembershipType
tags["ReadOnly","NotReplicated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Code samples: View on Creator Hub (check-membership-status).

Player.NameDisplayDistance

This property sets the distance in studs at which this player will see other Humanoid names. If the property is set to 0, names are hidden. This property is set to StarterPlayer.NameDisplayDistance by default.

If a humanoid's name is visible, you can set the display type using Humanoid.DisplayDistanceType.

FieldValue
typefloat
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryCamera
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.Neutral

This property determines whether the player is on a specific team.

FieldValue
typeboolean
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryTeam
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.PartyId

A read-only string identifying the party the player currently belongs to within the experience. If the player is not in a party, this value is an empty string.

This property is essential for integrating with the Roblox Party feature. Use it in combination with SocialService:GetPlayersByPartyId() and SocialService:GetPartyAsync() to access information about a player's party and its members.

To test this service in your experience, use the Party Simulator in Roblox Studio or publish the experience and play it in the Roblox application.

FieldValue
typestring
tags["Hidden","NotReplicated"]
security{"read":"None","write":"RobloxEngineSecurity"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Code samples: View on Creator Hub (Player-PartyId).

Player.ReplicationFocus

This property sets the part to focus replication around a player. Different Roblox systems that communicate over the network (such as physics, streaming, etc.) replicate at different rates depending on how close objects are to the replication focus.

When this property is nil, it reverts to its default behavior which is to treat the local player's character's PrimaryPart as the replication focus.

This property should only be set on the server with a Script, not a LocalScript. Note that this property does not change or update network ownership of parts.

FieldValue
typeInstance
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.RespawnLocation

If set, the player will respawn at the given SpawnLocation which must meet the following criteria:

Alternatives

FieldValue
typeSpawnLocation
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Code samples: View on Creator Hub (change-spawn-on-touch).

Player.StepIdOffset

Offset between client and server used by the Server Authority system. This property is not accessible through scripts.

FieldValue
typeint
security{"read":"RobloxEngineSecurity","write":"RobloxEngineSecurity"}
thread safetyReadSafe
categoryData
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.Team

This property is a reference to a Team object within the Teams service. If the player isn't on a team or has an invalid TeamColor, this property is nil. When this property is set, the player has joined the Team and the Team.PlayerAdded event fires on the associated team. Similarly, Team.PlayerRemoved fires when the property is unset from a certain Team.

FieldValue
typeTeam
tags["NotReplicated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryTeam
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.TeamColor

This property determines which Team a player is associated with according to that team's Team.TeamColor. If no Team object has the associated BrickColor, the player will not be associated with a team.

It's often a better idea to set Player.Team to the respective Team instead of using this property. Setting this property often leads to repetition of the same BrickColor value for a certain team across many scripts.

FieldValue
typeBrickColor
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryTeam
serialization{"can_load":true,"can_save":true}
capabilities["Players"]

Player.ThirdPartyTextChatRestrictionStatus

This read-only property holds the ChatRestrictionStatus that a third-party platform (for example, a console platform's parental or communication settings) reports for the player's text chat. The default value is ChatRestrictionStatus.Unknown.

This property cannot be set from scripts.

FieldValue
typeChatRestrictionStatus
tags["ReadOnly","NotReplicated"]
security{"read":"RobloxScriptSecurity","write":"RobloxScriptSecurity"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":true}
capabilities["Players"]

Player.User

A read-only User value that represents this player's domain-scoped identity within the current experience. The User encapsulates the player's domain user ID alongside the domain type and domain ID, providing an unambiguous identifier that carries its context.

Use this property as the standard way to identify users in new code. Engine APIs that accept user ID parameters also accept User values directly.

FieldValue
typeUser
security{"read":"None","write":"RobloxEngineSecurity"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Code samples: View on Creator Hub (Player-User).

Player.UserId

This property contains a read-only integer that uniquely and consistently identifies the user's account on Roblox. Unlike the player's DisplayName which may change, this value will never change for the same account.

This property is essential when saving/loading player data using GlobalDataStores.

FieldValue
typeint64
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Code samples: View on Creator Hub (Player-UserId1, GlobalDataStore-GetAsync1).

Player.userId

Deprecated. This property is a deprecated variant of Player.UserId which should be used instead.

FieldValue
typeint64
tags["Deprecated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}
capabilities["Players"]

Methods

NameType / ReturnsDescription
Player:AddReplicationFocus()Adds an additional replication focus for the player.
Player:ClearCachedAvatarAppearance()Clears the cached avatar appearance for the player, forcing a fresh fetch from the backend on the next respawn.
Player:ClearCharacterAppearance()Removes all accessories and other character appearance objects from a player's Character.
Player:DistanceFromCharacterfloatReturns the distance between the character's head and the given Vector3, or 0 if the player has no character.
Player:GetCameraStateCameraStateReturns a dictionary containing the player's current camera state.
Player:GetFriendsOnlineArrayReturns a dictionary of online friends.
Player:GetFriendsOnlineAsyncArrayReturns a dictionary of online friends.
Player:GetFriendsWhoPlayedAsyncArrayReturns the user IDs of friends who have previously joined this experience.
Player:GetJoinDataDictionaryReturns a dictionary containing information describing how the player joins the experience.
Player:GetMouseMouseReturns the mouse being used by the client.
Player:GetNetworkPingfloatReturns the round-trip, isolated network latency in seconds.
Player:GetRankInGroupintReturns the player's rank in the group as an integer.
Player:GetRankInGroupAsyncintReturns the player's rank in the group as an integer.
Player:GetRoleInGroupstringReturns the player's role in the group as a string, or Guest if the player isn't part of the group.
Player:GetRoleInGroupAsyncstringReturns the player's role in the group as a string, or Guest if the player isn't part of the group.
Player:HasAppearanceLoadedbooleanReturns whether or not the appearance of the player's character has loaded.
Player:IsBestFriendsWithbooleanReturns whether a player is friends with the specified user.
Player:IsFriendsWithbooleanChecks whether a player is a friend of the user with the given
Player:isFriendsWithboolean
Player:IsFriendsWithAsyncbooleanChecks whether a player is a friend of the user with the given Player.UserId.
Player:IsInGroupbooleanChecks whether a player is a member of a group with the given ID.
Player:IsInGroupAsyncbooleanChecks whether a player is a member of a group with the given ID.
Player:IsVerifiedbooleanReturns whether the player meets the specified verification level.
Player:Kick()Forcibly disconnect a player from the experience, optionally providing a message.
Player:LoadBooleanbooleanReturns a boolean value that was previously saved to the player with Player:SaveBoolean() with the same key.
Player:loadBooleanboolean
Player:LoadCharacter()Creates a new character for the player, removing the old one. Also clears the player's Backpack and PlayerGui.
Player:LoadCharacterAppearance()Places the given instance either in the player's character, head, or StarterGear based on the instance's class.
Player:LoadCharacterAsync()Creates a new character for the player, removing the old one. Also clears the player's Backpack and PlayerGui.
Player:LoadCharacterWithHumanoidDescription()Spawns a player character with everything equipped in the passed in HumanoidDescription.
Player:LoadCharacterWithHumanoidDescriptionAsync()Spawns a player character with everything equipped in the passed in HumanoidDescription.
Player:LoadInstanceInstanceReturns an instance that was previously saved to the player with Player:SaveInstance() with the same key.
Player:loadInstanceInstance
Player:LoadNumberdoubleReturns a number value that was previously saved to the player.
Player:loadNumberdouble
Player:LoadStringstringReturns a string value that was previously saved to the player.
Player:loadStringstring
Player:Move()Causes the player's character to walk in the given direction until stopped, or interrupted by the player (by using their controls).
Player:PromptAgeCheck()Prompts the player to complete age verification.
Player:RemoveReplicationFocus()Removes a previously added replication focus.
Player:RequestStreamAroundAsync()Requests that the server stream to the player around the specified location.
Player:SaveBoolean()Used to save a boolean value that can be loaded again at a later time using Player:LoadBoolean().
Player:saveBoolean()
Player:SaveInstance()Saves an instance which can be loaded again at a later time.
Player:saveInstance()
Player:SaveNumber()Saves a number value that can be loaded again at a later time using.
Player:saveNumber()
Player:SaveString()Saves a string value that can be loaded again at a later time.
Player:saveString()
Player:SetAccountAge()Sets the AccountAge of the player.
Player:SetSuperSafeChat()Sets whether or not the player sees filtered chats, rather than normal chats.
Player:WaitForDataReadybooleanUsed 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.
Player:waitForDataReadyboolean

Inherited from Instance

NameType / ReturnsDescription
Instance:AddTag()Applies a tag to the instance.
Instance:childrenInstancesReturns an array of the object's children.
Instance:ClearAllChildren()This method destroys all of an instance's children.
Instance:CloneInstanceCreate a copy of an instance and all its descendants, ignoring instances that are not Archivable.
Instance:cloneInstance
Instance:Destroy()Sets the Instance.Parent property to nil, locks the Instance.Parent property, disconnects all connections, and calls Destroy() on all children.
Instance:destroy()
Instance:FindFirstAncestorInstance?Returns the first ancestor of the Instance whose Instance.Name is equal to the given name.
Instance:FindFirstAncestorOfClassInstance?Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className.
Instance:FindFirstAncestorWhichIsAInstance?Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstChildInstance?Returns the first child of the Instance found with the given name.
Instance:findFirstChildInstance
Instance:FindFirstChildOfClassInstance?Returns the first child of the Instance whose ClassName is equal to the given class name.
Instance:FindFirstChildWhichIsAInstance?Returns the first child of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstDescendantInstance?Returns the first descendant found with the given Instance.Name.
Instance:GetActorActor?Returns the Actor associated with the Instance, if any.
Instance:GetAttributeVariantReturns the value which has been assigned to the given attribute name.
Instance:GetAttributeChangedSignalRBXScriptSignalReturns an event that fires when the given attribute changes.
Instance:GetAttributesDictionaryReturns a dictionary of the instance's attributes.
Instance:GetChildrenInstancesReturns an array containing all of the instance's children.
Instance:getChildrenInstances
Instance:GetDebugIdstringReturns a coded string of the debug ID used internally by Roblox.
Instance:GetDescendantsInstancesReturns an array containing all of the descendants of the instance.
Instance:GetFullNamestringReturns a string describing the instance's ancestry.
Instance:GetStyledVariantReturns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified.
Instance:GetStyledPropertyChangedSignalRBXScriptSignalReturns an event that fires when the given style property changes on the instance.
Instance:GetTagsArrayGets an array of all tags applied to the instance.
Instance:HasTagbooleanCheck whether the instance has a given tag.
Instance:IsAncestorOfbooleanReturns true if an Instance is an ancestor of the given descendant.
Instance:IsDescendantOfbooleanReturns true if an Instance is a descendant of the given ancestor.
Instance:isDescendantOfboolean
Instance:IsPropertyModifiedbooleanReturns true if the value stored in the specified property is not equal to the code-instantiated default.
Instance:QueryDescendantsInstancesReturns an array containing all descendants of the instance that match the selector string.
Instance:Remove()Sets the object's Parent to nil, and does the same for all its descendants.
Instance:remove()
Instance:RemoveTag()Removes a tag from the instance.
Instance:ResetPropertyToDefault()Resets a property to its default value.
Instance:SetAttribute()Sets the attribute with the given name to the given value.
Instance:WaitForChildInstanceReturns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does.

Inherited from Object

NameType / ReturnsDescription
Object:GetPropertyChangedSignalRBXScriptSignalGet an event that fires when a given property of the object changes.
Object:IsAbooleanReturns true if an object's class matches or inherits from a given class.
Object:isAboolean

Player:AddReplicationFocus

This method adds an additional replication focus for the player in order to trigger streaming around the location of the specified part. In this manner, streaming can occur around multiple locations, not just the location of Player.ReplicationFocus. This has no effect in experiences that are not streaming enabled.

Additional foci will use the same values of Workspace.StreamingMinRadius and Workspace.StreamingTargetRadius as are used by the primary focus.

This method should only be called on the server. It has no effect when called from a LocalScript.

Parameters

NameTypeDefaultDescription
partBasePartThe BasePart to use as a new replication focus.

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:ClearCachedAvatarAppearance

This method clears the cached avatar appearance for the player. The next time LoadCharacterAsync() is called with the player's default platform appearance, a fresh version will be fetched from the backend instead of using the cached version.

Avatar appearance is cached after the first load to improve respawn latency and reduce backend load; most players do not change their avatar mid-session. Call this method when you want to reflect a change the player has made to their avatar outside of the experience, for example to implement a custom refresh button that mirrors the behavior of the default in-experience menu.

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["AvatarAppearance","Players"]

Player:ClearCharacterAppearance

This method removes all Accessory, Shirt, Pants, CharacterMesh, and BodyColors from the given player's Character. In addition, it also removes the T-Shirt Decal on the player's torso. The character's body part colors and face will remain unchanged. This method does nothing if the player does not have a Character.

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (Player-ClearCharacterAppearance1).

Player:DistanceFromCharacter

This method returns the distance between the character's head and the given Vector3 point, or 0 if the player has no Character.

This is useful when determining the distance between a player and another object or location in experience.

If you would like to determine the distance between two non-player instances or positions, you can use the following:

Parameters

NameTypeDefaultDescription
pointVector3The location from which player's distance to is being measured.

Returns

TypeDescription
floatThe distance in studs between the player and the location.
FieldValue
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (Player-DistanceFromCharacter1, Player-DistanceFromCharacter).

Player:GetCameraState

Returns a dictionary containing information about the player's current camera state. This method requires Server Authority to be enabled in the game. The dictionary contains the following fields:

Key Value Type Description
CFrame Datatype.CFrame The current Class.Camera.CFrame|CFrame of the player's camera.
FieldOfView number The current Class.Camera.FieldOfView|FieldOfView of the player's camera in degrees.
ViewportSize Datatype.Vector2 The current Class.Camera.ViewportSize|ViewportSize of the player's camera in pixels.

On the client, this method can only be called on the Players.LocalPlayer. On the server, it can be called on any Player object to retrieve their replicated camera state. Typical server-side uses include aim and look-direction logic in server-authoritative gameplay, and camera-aware content streaming.

The CFrame field is replicated as part of the player's input stream, meaning it is synchronized with other inputs such as movement and actions. The FieldOfView and ViewportSize fields use standard client-to-server property replication which is not synchronized with input and may update at a different cadence.

Returns

TypeDescription
CameraStateA dictionary containing CFrame, FieldOfView, and ViewportSize values.
FieldValue
tags["CustomLuaState"]
securityNone
thread safetySafe
capabilities["Players"]
simulationAccesstrue

Code samples: View on Creator Hub (Player-GetCameraState).

Player:GetFriendsOnline

Deprecated. This method has been superseded by GetFriendsOnlineAsync().

This method returns an array describing the LocalPlayer's currently online friends, up to a maximum of maxFriends entries. It can only be called on the Players.LocalPlayer; calling it on any other Player raises an error. No more than 200 friends are ever returned, and requesting more logs a warning.

This method has been superseded by GetFriendsOnlineAsync(), which shares the same behavior and return format. See that method for the full description of the returned dictionary array.

Parameters

NameTypeDefaultDescription
maxFriendsint200The maximum number of online friends to return.

Returns

TypeDescription
ArrayA dictionary of online friends (see the table above).
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players","Social"]

Code samples: View on Creator Hub (how-to-get-a-list-of-online-friends).

Player:GetFriendsOnlineAsync

This function returns a dictionary array of online friends, using a 30 second cache. In the returned array, some fields are only present for certain location types; for example, PlaceId won't be present when LocationType is 0 (mobile website).

Name Type Description
VisitorId number The Class.Player.UserId|UserId of the friend.
UserName string The username of the friend.
DisplayName string The Class.Player.DisplayName|DisplayName of the friend.
LastOnline string When the friend was last online.
IsOnline boolean If the friend is currently online.
LastLocation string The name of the friend's current location.
PlaceId number The place ID of the friend's last location.
GameId string The Class.DataModel.JobId of the friend's last location.
LocationType number The location type of the friend's last location.

Parameters

NameTypeDefaultDescription
maxFriendsint200The maximum number of online friends to return.

Returns

TypeDescription
ArrayA dictionary of online friends (see the table above).
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["Players","Social"]

Code samples: View on Creator Hub (how-to-get-a-list-of-online-friends).

Player:GetFriendsWhoPlayedAsync

Returns an array of user IDs of any friends who have previously played this game. For example, if a player has had two friends play the game, the method might return {1111111111, 2222222222}. If no friends have played this game, the method returns an empty array ({}).

This is particularly useful for friend leaderboards: by narrowing DataStore lookups to only friends who have actually played the experience, you avoid fetching scores for the entire friends list and reduce the risk of hitting DataStore rate limits.

Returns

TypeDescription
ArrayAn array of user IDs.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["Players","Social"]

Player:GetJoinData

Returns a dictionary containing information describing how the player joins the experience. The dictionary contains any of the following fields:

Key Value Type Description
SourceGameId number The Class.DataModel.GameId of the experience the Player teleported from. Only present if the player teleports to the current experience and if a server calls the teleport function.
SourcePlaceId number The Class.DataModel.PlaceId of the place the Player teleported from. Only present if the player teleports to the current place and a server calls the teleport function.
ReferredByPlayerId number The Class.Player.UserId|UserId of the player who invited the current player to the experience. Use this data to identify the referrer and trigger reward logic.
Members array An array containing the Class.Player.UserId|UserId numbers of the users teleported alongside the player. Only present if the player teleported as part of a group.
TeleportData variant Reflects the teleportData specified in the original teleport. Useful for sharing information between servers the player teleports to. Only present if teleportData was specified and a server calls the teleport function.
LaunchData string A plain or JSON encoded string that contains launch data specified in a share link or Class.ExperienceInviteOptions.LaunchData.
GameJoinContext dictionary A dictionary that includes relevant information based on the context of the join. It contains the following keys:

  • JoinSource: Enum.JoinSource
  • ItemType: optional Enum.AvatarItemType
  • AssetId: optional string
  • OutfitId: optional string
  • AssetType: optional Enum.AssetType

If a server initiates the player's teleport, the dictionary that this method returns includes the player's teleport data. The GetJoinData() method can only be used to fetch teleport data on the server. To fetch the data on the client, use TeleportService:GetLocalPlayerTeleportData().

Unlike TeleportService:GetLocalPlayerTeleportData(), GetJoinData() only provides teleport data that meets the following security criteria:

As this data is transmitted by the client, it can still potentially be abused by an exploiter. Sensitive data such as player currency should be transmitted via a secure solution like Memory Stores.

Returns

TypeDescription
DictionaryA dictionary containing PlaceId and UserId values (see table in description).
FieldValue
tags["CustomLuaState"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (Player-GetJoinData-Tracking-Traffic-Sources, Player-GetJoinData-Referral-Url-Generator, Player-GetJoinData-Table-as-Launch-Data, Player-GetJoinData-Decoding-Json-Launch-Data, server-teleportdata-example).

Player:GetMouse

This method returns the Mouse being used by the client. The player's mouse instance can be used to track user mouse input including left and right mouse button clicks and movement and location.

Note that UserInputService provides additional methods, properties, and events to track user input, especially for devices that do not use a mouse.

Returns

TypeDescription
MouseThe player's Mouse instance.
FieldValue
securityNone
thread safetyUnsafe
capabilities["Input","Players"]

Player:GetNetworkPing

Returns the round-trip, isolated network latency of the player in seconds. "Ping" is a measurement of the time taken for data to be sent from the client to the server, then back again. It doesn't involve data deserialization or processing.

For client-side LocalScripts, this function can only be called on the Players.LocalPlayer. This function is useful in identifying and debugging issues that occur in high network latency scenarios. It's also useful for masking latency, such as adjusting the speed of throwing animations for projectiles.

Returns

TypeDescription
floatThe round-trip network latency of the player in seconds.
FieldValue
securityNone
thread safetySafe
capabilities["Players"]

Player:GetRankInGroup

Deprecated. This method has been superseded by GetRankInGroupAsync().

Only public roles are considered.

Parameters

NameTypeDefaultDescription
groupIdint64The groupId of the specified group.

Returns

TypeDescription
intThe player's rank in the group.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players","Groups"]

Code samples: View on Creator Hub (Player-GetRankInGroup1).

Player:GetRankInGroupAsync

Deprecated. This method returns only the rank value of the member's highest public role. Use GroupService:GetRolesInGroupAsync() instead, which returns all public roles.

This method 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. Only public roles are considered.

This call may not yield the most up-to-date information. If a player leaves a group while they are in the experience, GetRankInGroupAsync() will still think they're in that group until they leave. However, this does not happen when used with a LocalScript because the method caches results, so multiple calls of GetRankInGroupAsync() on the same player with the same group ID will yield the same result as when the method was first called with the given group ID. The caching behavior is on a per-peer basis: a server does not share the same cache as a client.

When a player joins a group in-experience due to a call to GroupService:PromptJoinAsync(), any cached value for that player will be cleared on the client where the prompt was shown.

Parameters

NameTypeDefaultDescription
groupIdint64The groupId of the specified group.

Returns

TypeDescription
intThe player's rank in the group.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players","Groups"]

Code samples: View on Creator Hub (Player-GetRankInGroup1).

Player:GetRoleInGroup

Deprecated. This method has been superseded by GetRoleInGroup().

Only public roles are considered.

Parameters

NameTypeDefaultDescription
groupIdint64The group ID of the specified group.

Returns

TypeDescription
stringThe player's role in the specified group, or Guest if the player is not a member.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players","Groups"]

Code samples: View on Creator Hub (Player-GetRoleInGroup1).

Player:GetRoleInGroupAsync

Deprecated. This method returns only the member's highest public role. Use GroupService:GetRolesInGroupAsync() instead, which returns all public roles.

This method returns the player's role in the group as a string, or Guest if the player isn't part of the group. Only public roles are considered.

This call may not yield the most up-to-date information. If a player leaves a group while they are in the experience, GetRoleInGroupAsync() will still think they're in that group until they leave. However, this does not happen when used with a LocalScript because the method caches results, so multiple calls of GetRoleInGroupAsync() on the same player with the same group ID will yield the same result as when the method was first called with the given group ID. The caching behavior is on a per-peer basis: a server does not share the same cache as a client.

When a player joins a group in-experience due to a call to GroupService:PromptJoinAsync(), any cached value for that player will be cleared on the client where the prompt was shown.

Parameters

NameTypeDefaultDescription
groupIdint64The group ID of the specified group.

Returns

TypeDescription
stringThe player's role in the specified group, or Guest if the player is not a member.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players","Groups"]

Code samples: View on Creator Hub (Player-GetRoleInGroup1).

Player:HasAppearanceLoaded

This method returns whether or not the appearance of the player's Character has loaded. Appearance includes items such as the player's Shirt, Pants, and Accessories.

This is useful when determining whether a player's appearance has loaded after they first join the experience, which can be tracked using the Players.PlayerAdded event.

Returns

TypeDescription
booleanA boolean indicating whether or not the appearance of the player's character has loaded.
FieldValue
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (check-if-a-player-s-appearance-has-loaded).

Player:IsBestFriendsWith

Deprecated. This function is obsolete because the "best friends" feature was removed. Use Player:IsFriendsWithAsync() instead.

This function was once used to return whether a player is best friends with the specified user, but the feature has since been removed.

Parameters

NameTypeDefaultDescription
userIdUserThe Player.UserId of the user to check friendship with.

Returns

TypeDescription
booleanA boolean indicating whether the player is friends with the specified user.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:IsFriendsWith

Deprecated. This method has been superseded by the Player:IsFriendsWithAsync() method which should be used for new work.

This method sends a request to Roblox asking whether the player is a friend of the user with the given UserId. Results are cached, so multiple calls on the same player with the same userId may not reflect the most up-to-date friendship status.

This method has been superseded by IsFriendsWithAsync(), which shares the same behavior and should be used for new work.

Parameters

NameTypeDefaultDescription
userIdUserThe Player.UserId of the specified player.

Returns

TypeDescription
booleanA boolean indicating whether a player is a friend of the specified user.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players","Social"]

Code samples: View on Creator Hub (Player-IsFriendsWith1).

Player:isFriendsWith

Deprecated. This method has been superseded by the Player:IsFriendsWithAsync() method which should be used for new work.

Parameters

NameTypeDefaultDescription
userIdUser

Returns

TypeDescription
boolean
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:IsFriendsWithAsync

This method sends a request to Roblox asking whether a player is a friend of another user, given the UserId of that user. This method caches results so multiple calls on the same player with the same userId may not yield the most up-to-date result.

Parameters

NameTypeDefaultDescription
userIdUserThe Player.UserId of the specified player.

Returns

TypeDescription
booleanA boolean indicating whether a player is a friend of the specified user.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["Players","Social"]

Player:IsInGroup

Deprecated. This method has been superseded by IsInGroupAsync().

This method sends a request to Roblox asking whether the player is a member of the group with the given ID.

This method has been superseded by IsInGroupAsync(), which shares the same behavior (including its per-peer result caching) and should be used for new work.

Parameters

NameTypeDefaultDescription
groupIdint64The group ID of the specified group.

Returns

TypeDescription
booleanA boolean indicating whether the player is in the specified group.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players","Groups"]

Player:IsInGroupAsync

This method sends a request to Roblox asking whether a player is a member of a group, given the ID of that group.

This call may not yield the most up-to-date information. If a player leaves a group while they are in the experience, IsInGroupAsync() will still think they're in that group until they leave. However, this does not happen when used with a LocalScript because the method caches results, so multiple calls of IsInGroupAsync() on the same player with the same group ID will yield the same result as when the method was first called with the given group ID. The caching behavior is on a per-peer basis: a server does not share the same cache as a client.

When a player joins a group in-experience due to a call to GroupService:PromptJoinAsync(), any cached value for that player will be cleared on the client where the prompt was shown.

Parameters

NameTypeDefaultDescription
groupIdint64The group ID of the specified group.

Returns

TypeDescription
booleanA boolean indicating whether the player is in the specified group.
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["Players","Groups"]

Player:IsVerified

Returns a boolean value indicating whether the player meets the specified VerifiedLevel. When level is omitted, this method defaults to VerifiedLevel.Low. Note that this is a distinct check from the verified badge.

Verification uses concrete, real-world signals, including, but not limited to, phone number or government ID verification.

When implementing IsVerified, exercise caution to ensure that the implementation does not inadvertently block all unverified users.

Note that the method can only be called on the backend server. Calling it client-side results in an error. Additionally, this method will always return false in Studio.

Parameters

NameTypeDefaultDescription
levelVerifiedLevelLowThe verification level to check. Defaults to VerifiedLevel.Low.

Returns

TypeDescription
booleanA boolean indicating whether the player meets the specified verification level.
FieldValue
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (Player-IsVerified).

Player:Kick

This method allows an experience to gracefully disconnect a client and optionally provide a message to the disconnected user. This is useful for moderating abusive users. You should only allow specific users whom you trust to trigger this method on other users.

Calling this method on a Player with no arguments disconnects the user from the server and provides a default notice message. Calling this method on a Player along with a string as the first argument replaces the default message with the provided string.

When using this method from a LocalScript, only the local user's client can be kicked.

Parameters

NameTypeDefaultDescription
messagestringThe message to show the user upon kicking.

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["Players","Consequences"]

Player:LoadBoolean

Deprecated. This item is deprecated, as it may have been used for a now obsolete data persistence method. Please save and load player data using DataStoreService for new work.

This function returns a boolean value that was previously saved to the player with Player:SaveBoolean() with the same key. Returns false if the key doesn't exist, not nil.

Parameters

NameTypeDefaultDescription
keystringThe string key under which the boolean was previously saved.

Returns

TypeDescription
booleanThe saved boolean value, or false if the key does not exist.
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:loadBoolean

Deprecated. This deprecated function is a variant of Player:LoadBoolean() which has also been deprecated. Neither function should be used in new work.

Parameters

NameTypeDefaultDescription
keystring

Returns

TypeDescription
boolean
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:LoadCharacter

Deprecated. This method has been superseded by LoadCharacterAsync().

This method creates a new Character for the player, removing the old one, and also clears the player's Backpack and PlayerGui. It can only be called on the server.

This method has been superseded by LoadCharacterAsync(), which shares the same character-loading behavior and should be used for new work.

Returns

TypeDescription
()
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (Player-LoadCharacter1).

Player:LoadCharacterAppearance

Deprecated. This method is deprecated. Do not use it for new work.

The LoadCharacterAppearance Player function places the given instance either in the player's Player.Character, head, or StarterGear based on the instance's class.

This is useful when giving a player's character an asset from the Roblox catalog, such as a hat or piece of gear.

It is similar to Player:LoadCharacterAsync(), except it does not reload the entire character instance, StarterGear, or PlayerGui.

Note:

Parameters

NameTypeDefaultDescription
assetInstanceInstanceAn instance of the asset being loaded, which can be obtained using the InsertService:LoadAsset() function.

Returns

TypeDescription
()
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["AvatarAppearance","Players"]

Code samples: View on Creator Hub (Player-LoadCharacterAppearance1).

Player:LoadCharacterAsync

This method creates a new character for the player, removing the old one. It also clears the player's Backpack and PlayerGui. This is useful in cases where you want to reload the character without killing the player, such as when you want to load a new character appearance after changing the player's CharacterAppearance.

When reloading a Player with their default platform appearance applied, a cached version of their appearance will be loaded. The cached version is cleared whenever the player's appearance is updated using AvatarEditorService or when the player manually resets via the in-experience menu. To programmatically clear this cache, call ClearCachedAvatarAppearance() before calling LoadCharacterAsync().

After calling LoadCharacterAsync() for an individual player, it is not recommended to call it again for the same player until after that player's CharacterAppearanceLoaded event has fired.

Character Loading Event Order

Calling the LoadCharacterAsync() method on any Player fires events in the following order:

  1. Player.Character sets, automatically removing old character.
  2. Player.CharacterAdded fires.
  3. Object.Changed fires on the Player with a value of Character.
  4. The character appearance initializes.
  5. Player.CharacterAppearanceLoaded fires.
  6. The character's Parent sets to the DataModel.
  7. The character rig builds and scales.
  8. The character moves to the spawn location.

Returns

TypeDescription
()
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (Player-LoadCharacter1).

Player:LoadCharacterWithHumanoidDescription

Deprecated. This method has been superseded by LoadCharacterWithHumanoidDescriptionAsync().

This method spawns a player character with everything equipped in the passed-in HumanoidDescription, such as body parts, colors, body scaling, accessories, clothing, and animations. A nil description raises an error, and a description that contains duplicate costume assets or duplicate body parts logs a warning before the character loads.

This method has been superseded by LoadCharacterWithHumanoidDescriptionAsync(), which shares the same behavior and should be used for new work.

Parameters

NameTypeDefaultDescription
humanoidDescriptionHumanoidDescriptionA HumanoidDescription containing traits like body parts/colors, body scaling, accessories, clothing, and animations that will be equipped to the loaded character.
assetTypeVerificationAssetTypeVerificationDefaultThe asset type verification mode.

Returns

TypeDescription
()
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (spawn-characters-with-humanoiddescription).

Player:LoadCharacterWithHumanoidDescriptionAsync

This method spawns a player character with everything equipped in the passed in HumanoidDescription.

After calling this method for an individual player, it is not recommended to call it again for the same player until after that player's CharacterAppearanceLoaded event has fired.

See also HumanoidDescription System, an article which explains the humanoid description system in greater detail and provides several scripting examples.

Parameters

NameTypeDefaultDescription
humanoidDescriptionHumanoidDescriptionA HumanoidDescription containing traits like body parts/colors, body scaling, accessories, clothing, and animations that will be equipped to the loaded character.
assetTypeVerificationAssetTypeVerificationDefaultThe asset type verification mode.

Returns

TypeDescription
()
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (spawn-characters-with-humanoiddescription).

Player:LoadInstance

Deprecated. This item is deprecated, as it may have been used for a now obsolete data persistence method. Please save and load player data using DataStoreService for new work.

This function returns an instance that was previously saved to the player with Player:SaveInstance() with the same key. Returns nil if the key doesn't exist.

Parameters

NameTypeDefaultDescription
keystringThe string key under which the instance was previously saved.

Returns

TypeDescription
InstanceThe saved Instance, or nil if the key does not exist.
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (Player-LoadInstance1).

Player:loadInstance

Deprecated. This deprecated function is a variant of Player:LoadInstance() which has also been deprecated. Neither function should be used in new work.

Parameters

NameTypeDefaultDescription
keystring

Returns

TypeDescription
Instance
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:LoadNumber

Deprecated. This item is deprecated, as it may have been used for a now obsolete data persistence method. Please save and load player data using DataStoreService for new work.

This function was once used by an ancient data persistence method to return a number value that was previously saved to the player with Player:SaveNumber() with the same key. Returns 0 if the key doesn't exist, not nil.

Parameters

NameTypeDefaultDescription
keystringThe string key under which the number was previously saved.

Returns

TypeDescription
doubleThe saved number value, or 0 if the key does not exist.
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (Player-LoadNumber1).

Player:loadNumber

Deprecated. This deprecated function is a variant of Player:LoadNumber() which has also been deprecated. Neither function should be used in new work.

Parameters

NameTypeDefaultDescription
keystring

Returns

TypeDescription
double
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:LoadString

Deprecated. This item is deprecated, as it may have been used for a now obsolete data persistence method. Please save and load player data using DataStoreService for new work.

This function returns a string value that was previously saved to the player with Player:SaveString() with the same key. Returns an empty string ("") if the key doesn't exist, not nil.

Parameters

NameTypeDefaultDescription
keystringThe string key under which the string was previously saved.

Returns

TypeDescription
stringThe saved string value, or an empty string if the key does not exist.
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (Player-LoadString1).

Player:loadString

Deprecated. This function is a deprecated variant of Player:LoadString() which has also been deprecated. Neither function should be used in new work.

Parameters

NameTypeDefaultDescription
keystring

Returns

TypeDescription
string
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:Move

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

This is useful when scripting NPC Humanoids that move around a map but are not controlled by an actual player's input.

Note that the function's second argument indicates whether the provided Vector3 should move the player relative to world coordinates (false) or the player's Camera (true).

Parameters

NameTypeDefaultDescription
walkDirectionVector3The Vector3 direction that the player should move.
relativeToCamerabooleanfalseA boolean indicating whether the player should move relative to the player's camera.

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (Player-Move1).

Player:PromptAgeCheck

This method requests that the player be shown the age verification prompt. When called from a LocalScript, it must target the Players.LocalPlayer; when called from a server Script, it can target any Player. Repeated calls for the same player within a short cooldown window are silently ignored.

On success, the PromptAgeCheckRequested event fires on the target player's client. When the player passes verification, their Player.AgeChecked property transitions to AgeCheckStatus.Checked.

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:RemoveReplicationFocus

This method removes a replication focus previously added by AddReplicationFocus(). Has no effect in experiences that are not streaming enabled.

This method should only be called on the server. It has no effect when called from a LocalScript.

Parameters

NameTypeDefaultDescription
partBasePartThe BasePart to remove as a replication focus.

Returns

TypeDescription
()
FieldValue
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:RequestStreamAroundAsync

For experiences where instance streaming is enabled, requests that the server stream to the player regions (parts and terrain) around the specified X, Y, Z location in the 3D world. It is useful if the experience knows that the player's CFrame will be set to the specified location in the near future. Without providing the location with this call, the player may not have streamed in content for the destination, resulting in a streaming pause or other undesirable behavior.

The effect of this call will be temporary and there are no guarantees of what will be streamed in around the specified location. Client memory limits and network conditions may impact what will be available on the client.

Parameters

NameTypeDefaultDescription
positionVector3World location where streaming is requested.
timeOutdouble0Optional timeout for the request, the maximum duration that the engine attempts to stream regions around the position parameter before abandoning the request. If you don't specify a value, the timeout is effectively infinite. However, if the client is low on memory, the engine abandons all streaming requests, even those that are still within the timeout duration.

Returns

TypeDescription
()
FieldValue
tags["Yields"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:SaveBoolean

Deprecated. This item is deprecated, as it may have been used for a now obsolete data persistence method. Please save and load player data using DataStoreService for new work.

This function is used to save a boolean value that can be loaded again at a later time using Player:LoadBoolean().

Parameters

NameTypeDefaultDescription
keystringThe string key to associate with the saved boolean value.
valuebooleanThe boolean value to save.

Returns

TypeDescription
()
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (Player-SaveBoolean1).

Player:saveBoolean

Deprecated. This function is a deprecated variant of Player:SaveBoolean() which has also been deprecated. Neither function should be used in new work.

Parameters

NameTypeDefaultDescription
keystring
valueboolean

Returns

TypeDescription
()
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:SaveInstance

Deprecated. This item is deprecated, as it may have been used for a now obsolete data persistence method. Please save and load player data using DataStoreService for new work.

This function was once used by an ancient data persistence method to save an instance which can be loaded again at a later time using Player:LoadInstance()..

Parameters

NameTypeDefaultDescription
keystringThe string key to associate with the saved instance.
valueInstanceThe Instance to save.

Returns

TypeDescription
()
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (Player-SaveInstance1).

Player:saveInstance

Deprecated. This function is a deprecated variant of Player:SaveInstance() which has also been deprecated. Neither function should be used in new work.

Parameters

NameTypeDefaultDescription
keystring
valueInstance

Returns

TypeDescription
()
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:SaveNumber

Deprecated. This item is deprecated, as it may have been used for a now obsolete data persistence method. Please save and load player data using DataStoreService for new work.

This function was once used by an ancient data persistence method to save a number value that can be loaded again at a later time using Player:LoadNumber().

Parameters

NameTypeDefaultDescription
keystringThe string key to associate with the saved number value.
valuedoubleThe number value to save.

Returns

TypeDescription
()
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (Player-SaveNumber1).

Player:saveNumber

Deprecated. This function is a deprecated variant of Player:SaveNumber() which has also been deprecated. Neither function should be used in new work.

Parameters

NameTypeDefaultDescription
keystring
valuedouble

Returns

TypeDescription
()
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:SaveString

Deprecated. This item is deprecated, as it may have been used for a now obsolete data persistence method. Please save and load player data using DataStoreService for new work.

This function was once used by an ancient data persistence method to save a string value that can be loaded again at a later time using Player:LoadString().

Parameters

NameTypeDefaultDescription
keystringThe string key to associate with the saved string value.
valuestringThe string value to save.

Returns

TypeDescription
()
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Code samples: View on Creator Hub (Player-SaveString1).

Player:saveString

Deprecated. This function is a deprecated variant of Player:SaveString() which has also been deprecated. Neither function should be used in new work.

Parameters

NameTypeDefaultDescription
keystring
valuestring

Returns

TypeDescription
()
FieldValue
tags["Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:SetAccountAge

This method sets the AccountAge of the player in days, meaning the age of the account itself relative to when it was first created.

Parameters

NameTypeDefaultDescription
accountAgeintThe age of the account in days.

Returns

TypeDescription
()
FieldValue
securityPluginSecurity
thread safetyUnsafe
capabilities["Players"]

Player:SetSuperSafeChat

This method sets whether or not the player sees chat filtered by TextService:FilterStringAsync() rather than normal chats.

local Players = game:GetService("Players")

local player = Players.LocalPlayer
player:SetSuperSafeChat(true)

Regardless of whether a player has filtered chat enabled, all chat should be filtered by TextService when broadcast to other players or on the player's own screen. TextService:FilterStringAsync() returns a TextFilterResult object that can be filtered differently according to the message's intended use.

Parameters

NameTypeDefaultDescription
valuebooleanA boolean indicating whether or not the player sees filtered chat.

Returns

TypeDescription
()
FieldValue
securityPluginSecurity
thread safetyUnsafe
capabilities["Players"]

Player:WaitForDataReady

Deprecated. This item is deprecated, as it may have been used for a now obsolete data persistence method. Please save and load player data using DataStoreService for new work.

This function is 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

Returns

TypeDescription
booleanA boolean indicating whether the player's data loaded successfully.
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Player:waitForDataReady

Deprecated. This function is a deprecated variant of Player:WaitForDataReady() which has also been deprecated. Neither function should be used in new work.

Returns

TypeDescription
boolean
FieldValue
tags["Yields","Deprecated"]
securityNone
thread safetyUnsafe
capabilities["Players"]

Events

NameType / ReturnsDescription
Player.CharacterAddedFires when a player's character spawns or respawns.
Player.CharacterAppearanceLoadedFires when the full appearance of a Character has been inserted.
Player.CharacterRemovingFires right before a player's character is removed.
Player.ChattedFires when a player chats in experience using Roblox's provided chat bar.
Player.IdledThis event fires approximately two minutes after the engine classifies the player as idle. Time is the number of seconds that have elapsed since that point.
Player.OnTeleportFires when the teleport state of a player changes.

Inherited from Instance

NameType / ReturnsDescription
Instance.AncestryChangedFires when the Instance.Parent property of this object or one of its ancestors is changed.
Instance.AttributeChangedFires whenever an attribute is changed on the Instance.
Instance.ChildAddedFires after an object is parented to this Instance.
Instance.childAdded
Instance.ChildRemovedFires after a child is removed from this Instance.
Instance.DescendantAddedFires after a descendant is added to the Instance.
Instance.DescendantRemovingFires immediately before a descendant of the Instance is removed.
Instance.DestroyingFires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy().
Instance.StyledPropertiesChangedFires whenever any style property is changed on the instance, including when a property is set to nil.

Inherited from Object

NameType / ReturnsDescription
Object.ChangedFires immediately after a property of the object changes, with some limitations.

Player.CharacterAdded

This event fires when a player's character spawns or respawns. It fires soon after setting Character to a non-nil value or calling LoadCharacterAsync(), which is before the character is parented to the Workspace.

This can be used alongside the CharacterRemoving event which fires right before a player's character is about to be removed, typically after death. As such, both of these events can potentially fire many times as players die then respawn in a place.

Note that the Humanoid and its default body parts (head, torso, and limbs) will exist on the server when this event fires, but clothing items like Hats, Shirts, and Pants might take a few seconds to be added to the character. The parts will also take time to replicate to clients. Connect Instance.ChildAdded on the added character to detect these, or wait for the CharacterAppearanceLoaded event to be sure the character has everything equipped.

If you instead need to track when a player joins/leaves the experience, use the events Players.PlayerAdded and Players.PlayerRemoving.

Parameters

NameTypeDefaultDescription
characterModelAn instance of the character that spawned/respawned.
FieldValue
securityNone
capabilities["Players"]

Code samples: View on Creator Hub (spawns-and-despawns, accessory-remover).

Player.CharacterAppearanceLoaded

This event fires when the full appearance of a Character has been inserted. It only fires on the server.

A Character generally has a range of objects modifying its appearance, including Accoutrements, Shirts, Pants and CharacterMeshes. This event will fire when all such objects have been inserted into the character.

For custom character implementations, such as using a character model named StarterCharacter inside StarterPlayer, use CharacterAdded and handle your own accessories.

One use for this event is to ensure all accessories have loaded before destroying them. See below for an example of this.

Parameters

NameTypeDefaultDescription
characterModelThe Player.Character Model.
FieldValue
securityNone
capabilities["Players"]

Code samples: View on Creator Hub (remove-accessories-after-loading).

Player.CharacterRemoving

This event fires right before a player's Character is removed, such as when the player is respawning. This can be used alongside the CharacterAdded event which fires when a player's character spawns or respawns.

If you instead need to track when a player joins/leaves the experience, use the events Players.PlayerAdded and Players.PlayerRemoving.

Parameters

NameTypeDefaultDescription
characterModelAn instance of the character that is being removed.
FieldValue
securityNone
capabilities["Players"]

Code samples: View on Creator Hub (spawns-and-despawns).

Player.Chatted

This event fires when a Player types a message and presses Enter in Roblox's provided chat bar. This is done using some Luau bindings by the default chat script. You can prevent players from chatting by using StarterGui:SetCoreGuiEnabled() and setting CoreGuiType.Chat to false.

Parameters

NameTypeDefaultDescription
messagestringThe content of the message the player typed in chat.
recipientPlayerDeprecated. For whisper messages, this was the Player who was the intended target of the chat message.
FieldValue
securityNone
capabilities["Chat","Players"]

Player.Idled

This event fires approximately two minutes after the engine classifies the player as idle. Time is the number of seconds that have elapsed since that point. The event continues to fire every 30 seconds for as long as the player remains idle.

Once the player becomes active again, Idled stops firing and the elapsed idle time resets. There is no separate event for the transition back to activity. If the player goes idle again later, Idled waits the same ~2 minutes before firing again.

This event only fires in client scripts, not server scripts; use a RemoteEvent to notify the server of idle players.

Roblox automatically disconnects players that have been idle for at least 20 minutes, so this event is useful for warning players that they will be disconnected soon, disconnecting players prior to those 20 minutes, or other away from keyboard (AFK) features.

To track how often automatic disconnects occur, try correlating this event with occurrences of Players.PlayerRemoving.

Parameters

NameTypeDefaultDescription
timedoubleThe time in seconds the player has been idle.
FieldValue
securityNone
capabilities["Players"]

Player.OnTeleport

This event fires when the TeleportState of a player changes. This event is useful for detecting whether a teleportation was successful.

Parameters

NameTypeDefaultDescription
teleportStateTeleportStateThe new TeleportState of the Player.
placeIdint64The ID of the place the Player is being teleported to.
spawnNamestringThe name of the spawn to teleport to, if TeleportService:TeleportToSpawnByName() has been used.
FieldValue
securityNone
capabilities["Players","Teleport"]

Code samples: View on Creator Hub (Player-OnTeleport1).