Player
An object that represents a presently connected client to the game.
Memory category | Instances |
---|
Member index 138
Removed member index 19
History | Member | |
---|---|---|
180 | ClanTag: string | |
273 | HasBuildTools: bool | |
273 | PersonalServerRank: int | |
335 | PlayerJoinData: PlayerJoinData | |
310 | BlockUser(player: Instance): string | |
273 | GetWebPersonalServerRank(): string | |
52 | HasBuildPermission(role: BuildPermission): bool | |
535 | IsUserAvailableForExperiment(): bool | |
338 | JumpCharacter(): void | |
338 | MoveCharacter(walkDirection: Vector2, maxWalkDelta: float): void | |
258 | SaveLeaderboardData(): void | |
180 | SetClanTag(newClanTag: string): void | |
273 | SetWebPersonalServerRank(rank: int): bool | |
310 | UnblockUser(player: Instance): string | |
90 | HoverOnPlayerChanged(playerHoveredOn: Instance) | |
90 | MouseDownOnPlayer(playerMouseDownOn: Instance) |
Description
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 Player.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:
- You can get a table of current Player objects using Players:GetPlayers(); again, use this instead of Instance:GetChildren().
- To detect the addition of Player objects, it is recommended to use the Players.PlayerAdded event (instead of Instance.ChildAdded on the Players service).
- Similarly, you can detect the removal of Player objects using Players.PlayerRemoving, which fires just before the Player is removed (instead of Instance.ChildRemoved which fires after). This is important if you are saving information about the player that might be removed or cleaned up on-removal.
History 574
- 624 Change Tags of GetJoinData from [] to [CustomLuaState]
- 623 Remove
- 622 Add
- 611 Add
- 611 Add SetChatTranslationSettingsLocaleId
- 597 Add
- 593 Add SetBlockListInitialized
- 578 Change Tags of DevEnableMouseLock from [Deprecated] to []
- 576 Change Tags of DevEnableMouseLock from [] to [Deprecated]
- 574 Remove
- 574 Remove
- 573 Change ReturnType of saveString from void to null
- 573 Change ReturnType of saveNumber from void to null
- 573 Change ReturnType of saveInstance from void to null
- 573 Change ReturnType of saveBoolean from void to null
- 573 Change ReturnType of UpdatePlayerBlocked from void to null
- 573 Change ReturnType of SetUnder13 from void to null
- 573 Change ReturnType of SetSuperSafeChat from void to null
- 573 Change ReturnType of SetModerationAccessKey from void to null
- 573 Change ReturnType of SetMembershipType from void to null
- 573 Change ReturnType of SetExperienceSettingsLocaleId from void to null
- 573 Change ReturnType of SetCharacterAppearanceJson from void to null
- 573 Change ReturnType of SetAccountAge from void to null
- 573 Change ReturnType of SaveString from void to null
- 573 Change ReturnType of SaveNumber from void to null
- 573 Change ReturnType of SaveInstance from void to null
- 573 Change ReturnType of SaveData from void to null
- 573 Change ReturnType of SaveBoolean from void to null
- 573 Change ReturnType of RevokeFriendship from void to null
- 573 Change ReturnType of RequestStreamAroundAsync from void to null
- 573 Change ReturnType of RequestFriendship from void to null
- 573 Change ReturnType of RemoveCharacter from void to null
- 573 Change ReturnType of Move from void to null
- 573 Change ReturnType of LoadData from void to null
- 573 Change ReturnType of LoadCharacterWithHumanoidDescription from void to null
- 573 Change ReturnType of LoadCharacterBlocking from void to null
- 573 Change ReturnType of LoadCharacterAppearance from void to null
- 573 Change ReturnType of LoadCharacter from void to null
- 573 Change ReturnType of Kick from void to null
- 573 Add IsVerified
- 573 Change ReturnType of ClearCharacterAppearance from void to null
- 573 Change ReturnType of AddToBlockList from void to null
- 562 Change ThreadSafety of GetNetworkPing from Unsafe to Safe
- 557 Add
- 554 Change Default of userId from 0 to
- 554 Change Default of from to
- 554 Change Default of UserId from 0 to
- 554 Change Default of from false to
- 554 Change Default of from false to
- 554 Change Default of from false to
- 554 Change Default of TeamColor from to
- 554 Change Default of Team from to
- 554 Change Default of from false to
- 554 Change Default of from 10 to
- 554 Change Default of RespawnLocation from to
- 554 Change Default of ReplicationFocus from to
- 554 Change Default of from to
- 554 Change Default of from to
- 554 Change Default of from to
- 554 Change Default of from to
- 554 Change Default of from to
- 554 Change Default of Neutral from true to
- 554 Change Default of NameDisplayDistance from 100 to
- 554 Change Default of from None to
- 554 Change Default of MembershipType from None to
- 554 Change Default of from 1000 to
- 554 Change Default of from 0 to
- 554 Change Default of from to
- 554 Change Default of from false to
- 554 Change Default of HealthDisplayDistance from 100 to
- 554 Add HasVerifiedBadge
- 554 Change Default of from false to
- 554 Change Default of GameplayPaused from false to
- 554 Change Default of from 0 to
- 554 Change Default of FollowUserId from 0 to
- 554 Change Default of DisplayName from to
- 554 Change Default of DevTouchMovementMode from UserChoice to
- 554 Change Default of DevTouchCameraMode from UserChoice to
- 554 Change Default of DevEnableMouseLock from true to
- 554 Change Default of DevComputerMovementMode from UserChoice to
- 554 Change Default of DevComputerCameraMode from UserChoice to
- 554 Change Default of DevCameraOcclusionMode from Zoom to
- 554 Change Default of from false to
- 554 Change Default of from 45000 to
- 554 Change Default of from 0 to
- 554 Change Default of from to
- 554 Change Default of from true to
- 554 Change Default of from to
- 554 Change Default of from NoOne to
- 554 Change Default of from TextAndMenu to
- 554 Change Default of from Vector3(NAN, NAN, NAN) to
- 554 Change Default of CharacterAppearanceId from 0 to
- 554 Change Default of CharacterAppearance from to
- 554 Change Default of Character from to
- 554 Change Default of CanLoadCharacterAppearance from true to
- 554 Change Default of CameraMode from Classic to
- 554 Change Default of CameraMinZoomDistance from 0.5 to
- 554 Change Default of CameraMaxZoomDistance from 400 to
- 554 Change Default of AutoJumpEnabled from true to
- 554 Change Default of from false to
- 554 Change Default of from 0 to
- 554 Change Default of AccountAge from 0 to
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 553 Change PreferredDescriptor of waitForDataReady from to WaitForDataReady
- 553 Change PreferredDescriptor of saveString from to SaveString
- 553 Change PreferredDescriptor of saveNumber from to SaveNumber
- 553 Change PreferredDescriptor of saveInstance from to SaveInstance
- 553 Change PreferredDescriptor of saveBoolean from to SaveBoolean
- 553 Change PreferredDescriptor of loadString from to LoadString
- 553 Change PreferredDescriptor of loadNumber from to LoadNumber
- 553 Change PreferredDescriptor of loadInstance from to LoadInstance
- 553 Change PreferredDescriptor of loadBoolean from to LoadBoolean
- 553 Change PreferredDescriptor of isFriendsWith from to IsFriendsWith
- 553 Change Default of userId from to 0
- 553 Change PreferredDescriptor of userId from to UserId
- 553 Change Default of UserId from to 0
- 553 Change Default of from to false
- 553 Change Default of from to false
- 553 Change Default of from to false
- 553 Change Default of TeamColor from to
- 553 Change Default of Team from to
- 553 Add
- 553 Change Default of from to 10
- 553 Change Default of RespawnLocation from to
- 553 Change Default of ReplicationFocus from to
- 553 Add
- 553 Add
- 553 Add
- 553 Change Default of Neutral from to true
- 553 Change Default of NameDisplayDistance from to 100
- 553 Add
- 553 Change Default of MembershipType from to None
- 553 Change Default of from to 1000
- 553 Add
- 553 Add
- 553 Change Default of HealthDisplayDistance from to 100
- 553 Change Default of from to false
- 553 Change Default of GameplayPaused from to false
- 553 Add
- 553 Change Default of FollowUserId from to 0
- 553 Change Default of DevTouchMovementMode from to UserChoice
- 553 Change Default of DevTouchCameraMode from to UserChoice
- 553 Change Default of DevEnableMouseLock from to true
- 553 Change Default of DevComputerMovementMode from to UserChoice
- 553 Change Default of DevComputerCameraMode from to UserChoice
- 553 Change Default of DevCameraOcclusionMode from to Zoom
- 553 Change Default of from to false
- 553 Change Default of from to 45000
- 553 Change Default of from to 0
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 553 Change Default of from to TextAndMenu
- 553 Add
- 553 Change Default of CharacterAppearanceId from to 0
- 553 Change PreferredDescriptor of CharacterAppearance from to CharacterAppearanceId
- 553 Change Default of Character from to
- 553 Change Default of CanLoadCharacterAppearance from to true
- 553 Change Default of CameraMode from to Classic
- 553 Change Default of CameraMinZoomDistance from to 0.5
- 553 Change Default of CameraMaxZoomDistance from to 400
- 553 Change Default of AutoJumpEnabled from to true
- 553 Change Default of from to false
- 553 Add
- 553 Change Default of AccountAge from to 0
- 547 Add
- 546 Add SetExperienceSettingsLocaleId
- 538 Add SetModerationAccessKey
- 535 Remove IsUserAvailableForExperiment
- 488 Change ReturnType of GetNetworkPing from int to float
- 486 Change ThreadSafety of userId from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of UserId from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of TeamColor from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Team from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of RespawnLocation from ReadOnly to ReadSafe
- 486 Change ThreadSafety of ReplicationFocus from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Neutral from ReadOnly to ReadSafe
- 486 Change ThreadSafety of NameDisplayDistance from ReadOnly to ReadSafe
- 486 Change ThreadSafety of MembershipType from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of HealthDisplayDistance from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of GameplayPaused from ReadOnly to ReadSafe
- 486 Change ThreadSafety of FollowUserId from ReadOnly to ReadSafe
- 486 Change ThreadSafety of DisplayName from ReadOnly to ReadSafe
- 486 Change ThreadSafety of DevTouchMovementMode from ReadOnly to ReadSafe
- 486 Change ThreadSafety of DevTouchCameraMode from ReadOnly to ReadSafe
- 486 Change ThreadSafety of DevEnableMouseLock from ReadOnly to ReadSafe
- 486 Change ThreadSafety of DevComputerMovementMode from ReadOnly to ReadSafe
- 486 Change ThreadSafety of DevComputerCameraMode from ReadOnly to ReadSafe
- 486 Change ThreadSafety of DevCameraOcclusionMode from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of CharacterAppearanceId from ReadOnly to ReadSafe
- 486 Change ThreadSafety of CharacterAppearance from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Character from ReadOnly to ReadSafe
- 486 Change ThreadSafety of CanLoadCharacterAppearance from ReadOnly to ReadSafe
- 486 Change ThreadSafety of CameraMode from ReadOnly to ReadSafe
- 486 Change ThreadSafety of CameraMinZoomDistance from ReadOnly to ReadSafe
- 486 Change ThreadSafety of CameraMaxZoomDistance from ReadOnly to ReadSafe
- 486 Change ThreadSafety of AutoJumpEnabled from ReadOnly to ReadSafe
- 486 Change ThreadSafety of from ReadOnly to ReadSafe
- 486 Change ThreadSafety of AccountAge from ReadOnly to ReadSafe
- 483 Change Parameters of FriendStatusChanged from (player: Instance, friendStatus: FriendStatus) to (player: Player, friendStatus: FriendStatus)
- 483 Change Parameters of Chatted from (message: string, recipient: Instance) to (message: string, recipient: Player)
- 483 Change Parameters of CharacterRemoving from (character: Instance) to (character: Model)
- 483 Change Parameters of CharacterAppearanceLoaded from (character: Instance) to (character: Model)
- 483 Change Parameters of CharacterAdded from (character: Instance) to (character: Model)
- 483 Change Parameters of RevokeFriendship from (player: Instance) to (player: Player)
- 483 Change Parameters of RequestFriendship from (player: Instance) to (player: Player)
- 483 Change Parameters of LoadCharacterWithHumanoidDescription from (humanoidDescription: Instance) to (humanoidDescription: HumanoidDescription)
- 483 Change ReturnType of GetMouse from Instance to Mouse
- 483 Change Parameters of GetFriendStatus from (player: Instance) to (player: Player)
- 481 Add GetNetworkPing
- 479 Add SetCharacterAppearanceJson
- 469 Change Tags of from [] to [Hidden]
- 469 Change Tags of from [] to [Hidden]
- 469 Change Tags of from [] to [Hidden]
- 469 Change Tags of from [] to [Hidden]
- 469 Change Tags of from [NotReplicated] to [Hidden, NotReplicated]
- 469 Change CanLoad of from true to false
- 469 Change Tags of from [NotReplicated] to [Hidden, NotReplicated]
- 469 Change CanLoad of from true to false
- 469 Change Tags of from [ReadOnly, NotReplicated] to [Hidden, ReadOnly, NotReplicated]
- 469 Change Tags of from [ReadOnly, NotReplicated, Deprecated] to [Hidden, ReadOnly, NotReplicated, Deprecated]
- 469 Change Tags of from [NotReplicated, Deprecated] to [Hidden, NotReplicated, Deprecated]
- 469 Change CanLoad of from true to false
- 469 Change Tags of from [ReadOnly, NotReplicated, Deprecated] to [Hidden, ReadOnly, NotReplicated, Deprecated]
- 469 Change Tags of from [ReadOnly, NotReplicated] to [Hidden, ReadOnly, NotReplicated]
- 469 Change Tags of from [ReadOnly, NotReplicated, Deprecated] to [Hidden, ReadOnly, NotReplicated, Deprecated]
- 462 Change ThreadSafety of SimulationRadiusChanged from to Unsafe
- 462 Change ThreadSafety of OnTeleport from to Unsafe
- 462 Change ThreadSafety of Idled from to Unsafe
- 462 Change ThreadSafety of FriendStatusChanged from to Unsafe
- 462 Change ThreadSafety of Chatted from to Unsafe
- 462 Change ThreadSafety of CharacterRemoving from to Unsafe
- 462 Change ThreadSafety of CharacterAppearanceLoaded from to Unsafe
- 462 Change ThreadSafety of CharacterAdded from to Unsafe
- 462 Change ThreadSafety of waitForDataReady from to Unsafe
- 462 Change ThreadSafety of saveString from to Unsafe
- 462 Change ThreadSafety of saveNumber from to Unsafe
- 462 Change ThreadSafety of saveInstance from to Unsafe
- 462 Change ThreadSafety of saveBoolean from to Unsafe
- 462 Change ThreadSafety of loadString from to Unsafe
- 462 Change ThreadSafety of loadNumber from to Unsafe
- 462 Change ThreadSafety of loadInstance from to Unsafe
- 462 Change ThreadSafety of loadBoolean from to Unsafe
- 462 Change ThreadSafety of isFriendsWith from to Unsafe
- 462 Change ThreadSafety of WaitForDataReady from to Unsafe
- 462 Change ThreadSafety of UpdatePlayerBlocked from to Unsafe
- 462 Change ThreadSafety of SetUnder13 from to Unsafe
- 462 Change ThreadSafety of SetSuperSafeChat from to Unsafe
- 462 Change ThreadSafety of SetMembershipType from to Unsafe
- 462 Change ThreadSafety of SetAccountAge from to Unsafe
- 462 Change ThreadSafety of SaveString from to Unsafe
- 462 Change ThreadSafety of SaveNumber from to Unsafe
- 462 Change ThreadSafety of SaveInstance from to Unsafe
- 462 Change ThreadSafety of SaveData from to Unsafe
- 462 Change ThreadSafety of SaveBoolean from to Unsafe
- 462 Change ThreadSafety of RevokeFriendship from to Unsafe
- 462 Change ThreadSafety of RequestStreamAroundAsync from to Unsafe
- 462 Change ThreadSafety of RequestFriendship from to Unsafe
- 462 Change ThreadSafety of RemoveCharacter from to Unsafe
- 462 Change ThreadSafety of Move from to Unsafe
- 462 Change ThreadSafety of LoadString from to Unsafe
- 462 Change ThreadSafety of LoadNumber from to Unsafe
- 462 Change ThreadSafety of LoadInstance from to Unsafe
- 462 Change ThreadSafety of LoadData from to Unsafe
- 462 Change ThreadSafety of LoadCharacterWithHumanoidDescription from to Unsafe
- 462 Change ThreadSafety of LoadCharacterBlocking from to Unsafe
- 462 Change ThreadSafety of LoadCharacterAppearance from to Unsafe
- 462 Change ThreadSafety of LoadCharacter from to Unsafe
- 462 Change ThreadSafety of LoadBoolean from to Unsafe
- 462 Change ThreadSafety of Kick from to Unsafe
- 462 Change ThreadSafety of IsUserAvailableForExperiment from to Unsafe
- 462 Change ThreadSafety of IsInGroup from to Unsafe
- 462 Change ThreadSafety of IsFriendsWith from to Unsafe
- 462 Change ThreadSafety of IsBestFriendsWith from to Unsafe
- 462 Change ThreadSafety of HasAppearanceLoaded from to Unsafe
- 462 Change ThreadSafety of GetUnder13 from to Unsafe
- 462 Change ThreadSafety of GetRoleInGroup from to Unsafe
- 462 Change ThreadSafety of GetRankInGroup from to Unsafe
- 462 Change ThreadSafety of GetMouse from to Unsafe
- 462 Change ThreadSafety of GetJoinData from to Unsafe
- 462 Change ThreadSafety of GetGameSessionID from to Unsafe
- 462 Change ThreadSafety of GetFriendsOnline from to Unsafe
- 462 Change ThreadSafety of GetFriendStatus from to Unsafe
- 462 Change ThreadSafety of DistanceFromCharacter from to Unsafe
- 462 Change ThreadSafety of ClearCharacterAppearance from to Unsafe
- 462 Change ThreadSafety of AddToBlockList from to Unsafe
- 462 Change ThreadSafety of userId from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of UserId from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of TeamColor from to ReadOnly
- 462 Change ThreadSafety of Team from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of RespawnLocation from to ReadOnly
- 462 Change ThreadSafety of ReplicationFocus from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of Neutral from to ReadOnly
- 462 Change ThreadSafety of NameDisplayDistance from to ReadOnly
- 462 Change ThreadSafety of MembershipType from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of HealthDisplayDistance from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of GameplayPaused from to ReadOnly
- 462 Change ThreadSafety of FollowUserId from to ReadOnly
- 462 Change ThreadSafety of DisplayName from to ReadOnly
- 462 Change ThreadSafety of DevTouchMovementMode from to ReadOnly
- 462 Change ThreadSafety of DevTouchCameraMode from to ReadOnly
- 462 Change ThreadSafety of DevEnableMouseLock from to ReadOnly
- 462 Change ThreadSafety of DevComputerMovementMode from to ReadOnly
- 462 Change ThreadSafety of DevComputerCameraMode from to ReadOnly
- 462 Change ThreadSafety of DevCameraOcclusionMode from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of CharacterAppearanceId from to ReadOnly
- 462 Change ThreadSafety of CharacterAppearance from to ReadOnly
- 462 Change ThreadSafety of Character from to ReadOnly
- 462 Change ThreadSafety of CanLoadCharacterAppearance from to ReadOnly
- 462 Change ThreadSafety of CameraMode from to ReadOnly
- 462 Change ThreadSafety of CameraMinZoomDistance from to ReadOnly
- 462 Change ThreadSafety of CameraMaxZoomDistance from to ReadOnly
- 462 Change ThreadSafety of AutoJumpEnabled from to ReadOnly
- 462 Change ThreadSafety of from to ReadOnly
- 462 Change ThreadSafety of AccountAge from to ReadOnly
- 451 Change CanLoad of from false to true
- 451 Change Tags of from [] to [NotReplicated]
- 429 Add RequestStreamAroundAsync
- 428 Remove RequestStreamAroundAsync
- 429 Add RequestStreamAroundAsync
- 428 Change WriteSecurity of DisplayName from RobloxScriptSecurity to None
- 428 Change ReadSecurity of DisplayName from RobloxScriptSecurity to None
- 423 Add
- 386 Change WriteSecurity of GameplayPaused from None to NotAccessibleSecurity
- 386 Change Tags of GameplayPaused from [ReadOnly, NotReplicated] to []
- 386 Change CanLoad of GameplayPaused from false to true
- 384 Add GameplayPaused
- 373 Change Tags of LoadCharacterAppearance from [] to [Deprecated]
- 363 Add LoadCharacterWithHumanoidDescription
- 344 Add UpdatePlayerBlocked
- 344 Add AddToBlockList
- 338 Remove MoveCharacter
- 338 Remove JumpCharacter
- 338 Add
- 335 Remove PlayerJoinData
- 333 Add GetJoinData
- 331 Add PlayerJoinData
- 329 Change ValueType of Team from Object to Team
- 329 Change ValueType of RespawnLocation from Object to SpawnLocation
- 329 Change ValueType of ReplicationFocus from Object to Instance
- 329 Change ValueType of Character from Object to Model
- 323 Change Parameters of isFriendsWith from (userId: int) to (userId: int64)
- 323 Change Parameters of IsInGroup from (groupId: int) to (groupId: int64)
- 323 Change Parameters of IsFriendsWith from (userId: int) to (userId: int64)
- 323 Change Parameters of IsBestFriendsWith from (userId: int) to (userId: int64)
- 323 Change Parameters of GetRoleInGroup from (groupId: int) to (groupId: int64)
- 323 Change Parameters of GetRankInGroup from (groupId: int) to (groupId: int64)
- 323 Change ValueType of userId from int to int64
- 323 Change ValueType of UserId from int to int64
- 323 Change ValueType of FollowUserId from int to int64
- 323 Change ValueType of CharacterAppearanceId from int to int64
- 322 Change Parameters of OnTeleport from (teleportState: TeleportState, placeId: int, spawnName: string) to (teleportState: TeleportState, placeId: int64, spawnName: string)
- 313 Add ReplicationFocus
- 310 Remove UnblockUser
- 310 Remove BlockUser
- 296 Add IsUserAvailableForExperiment
- 295 Change Tags of UnblockUser from [Yields] to [Yields, Deprecated]
- 295 Change Tags of BlockUser from [Yields] to [Yields, Deprecated]
- 293 Add
- 292 Change Tags of CharacterAppearance from [NotBrowsable] to [NotBrowsable, Deprecated]
- 291 Add DisplayName
- 290 Change Parameters of LoadCharacter from (inGame: bool = true) to ()
- 288 Add LoadCharacterBlocking
- 273 Remove SetWebPersonalServerRank
- 273 Remove GetWebPersonalServerRank
- 273 Remove PersonalServerRank
- 273 Remove HasBuildTools
- 272 Add SetWebPersonalServerRank
- 272 Add GetWebPersonalServerRank
- 272 Add PersonalServerRank
- 272 Add HasBuildTools
- 273 Remove SetWebPersonalServerRank
- 273 Remove GetWebPersonalServerRank
- 273 Remove PersonalServerRank
- 273 Remove HasBuildTools
- 270 Add UnblockUser
- 270 Add BlockUser
- 258 Remove SaveLeaderboardData
- 257 Add SaveLeaderboardData
- 258 Remove SaveLeaderboardData
- 252 Change Tags of WaitForDataReady from [Yields] to [Yields, Deprecated]
- 252 Change Tags of SaveString from [] to [Deprecated]
- 252 Change Tags of SaveNumber from [] to [Deprecated]
- 252 Change Tags of SaveLeaderboardData from [] to [Deprecated]
- 252 Change Tags of SaveInstance from [] to [Deprecated]
- 252 Change Tags of SaveData from [] to [Deprecated]
- 252 Change Tags of SaveBoolean from [] to [Deprecated]
- 252 Change Tags of LoadString from [] to [Deprecated]
- 252 Change Tags of LoadNumber from [] to [Deprecated]
- 252 Change Tags of LoadInstance from [] to [Deprecated]
- 252 Change Tags of LoadData from [] to [Deprecated]
- 252 Change Tags of LoadBoolean from [] to [Deprecated]
- 252 Change Tags of from [ReadOnly, NotReplicated] to [ReadOnly, NotReplicated, Deprecated]
- 252 Change Tags of from [NotReplicated] to [NotReplicated, Deprecated]
- 252 Change Tags of from [ReadOnly, NotReplicated] to [ReadOnly, NotReplicated, Deprecated]
- 250 Change Tags of LoadCharacter from [] to [Yields]
- 250 Add Team
- 250 Add CharacterAppearanceId
- 235 Add
- 218 Add HasAppearanceLoaded
- 218 Change Tags of from [ReadOnly, NotReplicated] to [ReadOnly, NotReplicated, Deprecated]
- 215 Add
- 213 Change Tags of userId from [] to [Deprecated]
- 210 Add CharacterAppearanceLoaded
- 210 Add UserId
- 206 Change Tags of IsBestFriendsWith from [Yields] to [Yields, Deprecated]
- 206 Add AutoJumpEnabled
- 205 Add
- 204 Change ReturnType of GetFriendsOnline from Dictionary to Array
- 204 Change Parameters of GetFriendsOnline from (maxFriends: int = 50) to (maxFriends: int = 200)
- 196 Change Parameters of Kick from () to (message: string = )
- 182 Add RespawnLocation
- 180 Remove SetClanTag
- 180 Remove ClanTag
- 177 Add DevTouchMovementMode
- 177 Add DevTouchCameraMode
- 177 Add DevEnableMouseLock
- 177 Add DevComputerMovementMode
- 177 Add DevComputerCameraMode
- 177 Add DevCameraOcclusionMode
- 176 Remove DevTouchMovementMode
- 176 Remove DevTouchCameraMode
- 176 Remove DevEnableMouseLock
- 176 Remove DevComputerMovementMode
- 176 Remove DevComputerCameraMode
- 176 Remove DevCameraOcclusionMode
- 177 Add DevTouchMovementMode
- 177 Add DevTouchCameraMode
- 177 Add DevEnableMouseLock
- 177 Add DevComputerMovementMode
- 177 Add DevComputerCameraMode
- 177 Add DevCameraOcclusionMode
- 169 Add FollowUserId
- 163 Add Move
- 151 Change Security of SetSuperSafeChat from LocalUserSecurity to PluginSecurity
- 151 Change Security of SetClanTag from LocalUserSecurity to PluginSecurity
- 151 Change Security of SetAccountAge from LocalUserSecurity to PluginSecurity
- 147 Add NameDisplayDistance
- 147 Add HealthDisplayDistance
- 147 Add ClanTag
- 147 Add CameraMinZoomDistance
- 147 Add CameraMaxZoomDistance
- 145 Add SetClanTag
- 138 Add SimulationRadiusChanged
- 133 Add GetGameSessionID
- 131 Add MoveCharacter
- 131 Add JumpCharacter
- 130 Add OnTeleport
- 125 Add
- 125 Remove
- 121 Add Kick
- 119 Add GetFriendsOnline
- 90 Remove MouseDownOnPlayer
- 90 Remove HoverOnPlayerChanged
- 83 Change Security of SetUnder13 from LocalUserSecurity to RobloxSecurity
- 83 Add GetUnder13
- 79 Change Tags of GetWebPersonalServerRank from [Yields] to [backend, Yields]
- 78 Change Tags of GetWebPersonalServerRank from [backend, Yields] to [Yields]
- 79 Change Tags of GetWebPersonalServerRank from [Yields] to [backend, Yields]
- 71 Change Parameters of SetWebPersonalServerRank from (Rank: int) to (rank: int)
- 71 Add GetMouse
- 69 Add GetRoleInGroup
- 69 Add GetRankInGroup
- 68 Add LoadCharacterAppearance
- 68 Add ClearCharacterAppearance
- 68 Add CanLoadCharacterAppearance
- 64 Add
- 61 Add saveString
- 61 Add saveNumber
- 61 Add saveInstance
- 61 Add saveBoolean
- 61 Add loadString
- 61 Add loadInstance
- 61 Add loadBoolean
- 61 Add isFriendsWith
- 61 Add
- 60 Change ReturnType of loadNumber from float to double
- 60 Change Parameters of SaveNumber from (key: string, value: float) to (key: string, value: double)
- 60 Change ReturnType of LoadNumber from float to double
- 55 Change Security of LoadCharacter from LocalUserSecurity to None
- 52 Remove HasBuildPermission
- 50 Add waitForDataReady
- 50 Add loadNumber
- 50 Add CameraMode
- 47 Add MouseDownOnPlayer
- 47 Add Idled
- 47 Add HoverOnPlayerChanged
- 47 Add FriendStatusChanged
- 47 Add Chatted
- 47 Add CharacterRemoving
- 47 Add CharacterAdded
- 47 Add WaitForDataReady
- 47 Add SetWebPersonalServerRank
- 47 Add SetUnder13
- 47 Add SetSuperSafeChat
- 47 Add SetMembershipType
- 47 Add SetAccountAge
- 47 Add SaveString
- 47 Add SaveNumber
- 47 Add SaveLeaderboardData
- 47 Add SaveInstance
- 47 Add SaveData
- 47 Add SaveBoolean
- 47 Add RevokeFriendship
- 47 Add RequestFriendship
- 47 Add RemoveCharacter
- 47 Add LoadString
- 47 Add LoadNumber
- 47 Add LoadInstance
- 47 Add LoadData
- 47 Add LoadCharacter
- 47 Add LoadBoolean
- 47 Add IsInGroup
- 47 Add IsFriendsWith
- 47 Add IsBestFriendsWith
- 47 Add HasBuildPermission
- 47 Add GetWebPersonalServerRank
- 47 Add GetFriendStatus
- 47 Add DistanceFromCharacter
- 47 Add userId
- 47 Add TeamColor
- 47 Add PersonalServerRank
- 47 Add Neutral
- 47 Add MembershipType
- 47 Add HasBuildTools
- 47 Add
- 47 Add
- 47 Add
- 47 Add
- 47 Add
- 47 Add CharacterAppearance
- 47 Add Character
- 47 Add
- 47 Add AccountAge
- 47 Add Player
Members 138
AccountAge
Type | Default | |
---|---|---|
int |
The AccountAge is a Player property that describes how long ago a player's account was registered in days. It is set using the Player:SetAccountAge() function, which cannot be accessed by scripts.
This property is useful for conditionally showing new Roblox players content such as tutorials.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | false |
History 5
- 554 Change Default of AccountAge from 0 to
- 553 Change Default of AccountAge from to 0
- 486 Change ThreadSafety of AccountAge from ReadOnly to ReadSafe
- 462 Change ThreadSafety of AccountAge from to ReadOnly
- 47 Add AccountAge
AddToBlockList
Parameters (1) | ||
---|---|---|
userIds | Array | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 573 Change ReturnType of AddToBlockList from void to null
- 462 Change ThreadSafety of AddToBlockList from to Unsafe
- 344 Add AddToBlockList
AutoJumpEnabled
Type | Default | |
---|---|---|
bool |
The AutoJumpEnabled property determines whether the Player.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 game, the StarterPlayer.AutoJumpEnabled value determines the initial state of this property. Then, this property determines the value of the Humanoid.AutoJumpEnabled property of the Player.Character on spawn. In other words, it is possible to set the auto-jump behavior on a per-character, per-player and per-game basis using these three properties.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
History 5
- 554 Change Default of AutoJumpEnabled from true to
- 553 Change Default of AutoJumpEnabled from to true
- 486 Change ThreadSafety of AutoJumpEnabled from ReadOnly to ReadSafe
- 462 Change ThreadSafety of AutoJumpEnabled from to ReadOnly
- 206 Add AutoJumpEnabled
CameraMaxZoomDistance
Type | Default | |
---|---|---|
float |
The CameraMaxZoomDistance Player property sets the maximum distance in studs the camera can be from the character with the default cameras.
In other words, it controls the maximum distance the player's camera is allowed to zoom out.
The default value of this property is set by StarterPlayer.CameraMaxZoomDistance. If this value is set to a lower value than Player.CameraMinZoomDistance, it will be increased to CameraMinZoomDistance.
Thread safety | ReadSafe |
---|---|
Category | Camera |
Loaded/Saved | true |
History 5
- 554 Change Default of CameraMaxZoomDistance from 400 to
- 553 Change Default of CameraMaxZoomDistance from to 400
- 486 Change ThreadSafety of CameraMaxZoomDistance from ReadOnly to ReadSafe
- 462 Change ThreadSafety of CameraMaxZoomDistance from to ReadOnly
- 147 Add CameraMaxZoomDistance
CameraMinZoomDistance
Type | Default | |
---|---|---|
float |
The CameraMinZoonDistance Player property sets the minimum distance in studs the camera can be from the character with the default cameras.
In other words, it controls the minimum distance the player's camera is allowed to zoom in.
The default value of this property is set by StarterPlayer.CameraMinZoomDistance. If this value is set to a higher value than Player.CameraMaxZoomDistance it will be decreased to CameraMaxZoomDistance.
Thread safety | ReadSafe |
---|---|
Category | Camera |
Loaded/Saved | true |
History 5
- 554 Change Default of CameraMinZoomDistance from 0.5 to
- 553 Change Default of CameraMinZoomDistance from to 0.5
- 486 Change ThreadSafety of CameraMinZoomDistance from ReadOnly to ReadSafe
- 462 Change ThreadSafety of CameraMinZoomDistance from to ReadOnly
- 147 Add CameraMinZoomDistance
CameraMode
Type | Default | |
---|---|---|
CameraMode |
The CameraMode 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:
- Players can right-click and drag (mouse), tap and drag (mobile), use the secondary thumbstick (gamepad), or press the left/right arrows (keyboard) to rotate the camera around their character.
- When a player moves their character, it faces in the corresponding movement direction.
- Players can zoom in and out freely, even to first person on full zoom in.
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.
Thread safety | ReadSafe |
---|---|
Category | Camera |
Loaded/Saved | true |
History 5
- 554 Change Default of CameraMode from Classic to
- 553 Change Default of CameraMode from to Classic
- 486 Change ThreadSafety of CameraMode from ReadOnly to ReadSafe
- 462 Change ThreadSafety of CameraMode from to ReadOnly
- 50 Add CameraMode
CanLoadCharacterAppearance
Type | Default | |
---|---|---|
bool |
The CanLoadCharacterAppearance Player 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.
If true, the character will load the appearance of the player corresponding to the player's Player.CharacterAppearanceId.
If false, the player will spawn with a default appearance - a grey character model without any hats, shirts, pants, etc.
Attempting to set the property after the character has spawned will not change the character, you must call Player:LoadCharacter() to load the new appearance.
Thread safety | ReadSafe |
---|---|
Category | Behavior |
Loaded/Saved | false |
History 5
- 554 Change Default of CanLoadCharacterAppearance from true to
- 553 Change Default of CanLoadCharacterAppearance from to true
- 486 Change ThreadSafety of CanLoadCharacterAppearance from ReadOnly to ReadSafe
- 462 Change ThreadSafety of CanLoadCharacterAppearance from to ReadOnly
- 68 Add CanLoadCharacterAppearance
Character
Type | Default | |
---|---|---|
Model |
The Character 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 Player:LoadCharacter().
Initially this property is nil
and it is set when the player's character
first spawns. Use the Player.CharacterAdded event to detect when a
player's character properly loads, and the
Player.CharacterRemoving event to detect when the character is
about to despawn. Avoid using Instance: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:
1 2 3 4 5 6 7 |
|
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
CharacterAdded
Parameters (1) | |
---|---|
character | Model |
The CharacterAdded event fires when a player's character spawns (or
respawns). This event fires soon after setting Player.Character to
a non-nil
value or calling Player:LoadCharacter(), which is
before the character is parented to the Workspace.
This can be used alongside the Player.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. If you want to detect when a player joins or leaves the game, use the Players.PlayerAdded and Players.PlayerRemoving events instead.
Note that the Humanoid and its default body parts (head, torso, and limbs) will exist when this event fires, but clothing items like Hats, Shirts, and Pants may take a few seconds to be added to the character. Connect Instance.ChildAdded on the added character to detect these, or wait for the Player.CharacterAppearanceLoaded event to be sure the character has everything equipped.
Thread safety | Unsafe |
---|
History 3
- 483 Change Parameters of CharacterAdded from (character: Instance) to (character: Model)
- 462 Change ThreadSafety of CharacterAdded from to Unsafe
- 47 Add CharacterAdded
CharacterAppearance
Type | Default | |
---|---|---|
string |
The CharacterAppearance 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 a game.
Attempting to set the property after the character has spawned will not change the character, you must call Player:LoadCharacter() to load the new appearance.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
History 6
- 554 Change Default of CharacterAppearance from to
- 553 Change PreferredDescriptor of CharacterAppearance from to CharacterAppearanceId
- 486 Change ThreadSafety of CharacterAppearance from ReadOnly to ReadSafe
- 462 Change ThreadSafety of CharacterAppearance from to ReadOnly
- 292 Change Tags of CharacterAppearance from [NotBrowsable] to [NotBrowsable, Deprecated]
- 47 Add CharacterAppearance
CharacterAppearanceId
Type | Default | |
---|---|---|
int64 |
This property determines the user ID of the account whose character appearance is used for a player's Player.Character. By default, this property is the Player.UserId, which uses the player's avatar as they have created it on the Roblox website.
Changing this property to the user ID of another account will cause the player to spawn with that account's appearance (hats, shirt, pants, etc).
Games can also toggle whether or not a player's character appearance is loaded in game by changing the StarterPlayer.LoadCharacterAppearance property.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
History 6
- 554 Change Default of CharacterAppearanceId from 0 to
- 553 Change Default of CharacterAppearanceId from to 0
- 486 Change ThreadSafety of CharacterAppearanceId from ReadOnly to ReadSafe
- 462 Change ThreadSafety of CharacterAppearanceId from to ReadOnly
- 323 Change ValueType of CharacterAppearanceId from int to int64
- 250 Add CharacterAppearanceId
CharacterAppearanceLoaded
Parameters (1) | |
---|---|
character | Model |
This event fires when the full appearance of a Player.Character has been inserted.
A Player.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 Player.Character.
One use for this event is to ensure all accessories have loaded before destroying them. See below for an example of this.
Thread safety | Unsafe |
---|
History 3
- 483 Change Parameters of CharacterAppearanceLoaded from (character: Instance) to (character: Model)
- 462 Change ThreadSafety of CharacterAppearanceLoaded from to Unsafe
- 210 Add CharacterAppearanceLoaded
CharacterRemoving
Parameters (1) | |
---|---|
character | Model |
The CharacterRemoving event fires right before a player's character is removed, such as when the player is respawning.
This event can be used alongside the Player.CharacterAdded event, which fires when a player's character spawns or respawns. For instance, if you would like to print a message every time a player spawns and dies:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
This event is only concerned with the Character of a Player. If you instead need to track when a player joins/leaves the game, use the events Players.PlayerAdded and Players.PlayerRemoving.
Thread safety | Unsafe |
---|
History 3
- 483 Change Parameters of CharacterRemoving from (character: Instance) to (character: Model)
- 462 Change ThreadSafety of CharacterRemoving from to Unsafe
- 47 Add CharacterRemoving
Chatted
Parameters (2) | |
---|---|
recipient | Player |
The Chatted event fires when a Player types a message and presses enter in Roblox's provided chat bar. This is done using some Lua bindings by the default chat script. You can prevent players from chatting by using StarterGui:SetCoreGuiEnabled() and disabling the Chat CoreGuiType.
Chat Commands
Using this event and some string manipulation functions like
string.sub() and string.lower(), it is possible to
create chat commands, even with arguments like player names. Usually,
commands are prefixed such as heal PlayerName
. To check for a prefix in
a string, use string.sub() on the message to check a substring
of the message: string.sub(message, 1, 6) == "/heal "
(note the
inclusion of the space). Then, extract the rest of the command using
string.sub() again: string.sub(message, 7)
will be equal to
the player name. Check if that player exists, and if so, perform the
command's action (in this example, healing them). Check the code samples
for examples of chat commands.
Filtering
The message text fired with this event is unfiltered. If you are displaying player input like chat to other players in any form, it must be filtered using Chat:FilterStringAsync(). Keep this in mind when creating your own chat systems; if your game does not properly filter chat it may have moderation action taken against it.
Thread safety | Unsafe |
---|
ClearCharacterAppearance
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
The ClearCharacterAppearance function removes all Accessory, Shirt, Pants, CharacterMesh, and BodyColors from the given player's Player.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.
It does not remove t-shirts, head meshes, or faces.
Thread safety | Unsafe |
---|
History 3
- 573 Change ReturnType of ClearCharacterAppearance from void to null
- 462 Change ThreadSafety of ClearCharacterAppearance from to Unsafe
- 68 Add ClearCharacterAppearance
DevCameraOcclusionMode
Type | Default | |
---|---|---|
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 (0). See DevCameraOcclusionMode for a list of available modes.
Thread safety | ReadSafe |
---|---|
Category | Camera |
Loaded/Saved | true |
History 7
- 554 Change Default of DevCameraOcclusionMode from Zoom to
- 553 Change Default of DevCameraOcclusionMode from to Zoom
- 486 Change ThreadSafety of DevCameraOcclusionMode from ReadOnly to ReadSafe
- 462 Change ThreadSafety of DevCameraOcclusionMode from to ReadOnly
- 177 Add DevCameraOcclusionMode
- 176 Remove DevCameraOcclusionMode
- 177 Add DevCameraOcclusionMode
DevComputerCameraMode
Type | Default | |
---|---|---|
DevComputerCameraMovementMode |
The DevComputerCameraMode property determines the manner in which a player moves their camera when using a device with a mouse and keyboard. See DevComputerCameraMovementMode for a description of each camera control mode available. 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.
The word "Computer" in this property name refers to non-TouchEnabled, non-GamepadEnabled devices.
When set to UserChoice, a player can choose between any control mode (except Scriptable) in the Roblox game settings. In general, it's a good idea to allow players to choose their control mode to maximize accessibility.
It's possible to create a custom control scheme by setting this property to Scriptable.
This property doesn't affect players using a touch enabled device. See Player.DevTouchCameraMode instead.
Thread safety | ReadSafe |
---|---|
Category | Camera |
Loaded/Saved | true |
History 7
- 554 Change Default of DevComputerCameraMode from UserChoice to
- 553 Change Default of DevComputerCameraMode from to UserChoice
- 486 Change ThreadSafety of DevComputerCameraMode from ReadOnly to ReadSafe
- 462 Change ThreadSafety of DevComputerCameraMode from to ReadOnly
- 177 Add DevComputerCameraMode
- 176 Remove DevComputerCameraMode
- 177 Add DevComputerCameraMode
DevComputerMovementMode
Type | Default | |
---|---|---|
DevComputerMovementMode |
The DevComputerMovementMode property determines the manner in which a player moves their character when using a device with a mouse and keyboard. See DevComputerMovementMode for a description of each movement control mode available. 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.
The word "Computer" in this property name refers to non-TouchEnabled devices.
When set to UserChoice, a player can choose between any control mode (except Scriptable) in the Roblox game settings. In general, it is a good idea to allow players to choose their control mode to maximize accessibility.
It's possible to create a custom control scheme by setting this property to Scriptable.
This property doesn't affect players using a touch-enabled device. See Player.DevTouchMovementMode instead.
Thread safety | ReadSafe |
---|---|
Category | Control |
Loaded/Saved | true |
History 7
- 554 Change Default of DevComputerMovementMode from UserChoice to
- 553 Change Default of DevComputerMovementMode from to UserChoice
- 486 Change ThreadSafety of DevComputerMovementMode from ReadOnly to ReadSafe
- 462 Change ThreadSafety of DevComputerMovementMode from to ReadOnly
- 177 Add DevComputerMovementMode
- 176 Remove DevComputerMovementMode
- 177 Add DevComputerMovementMode
DevEnableMouseLock
Type | Default | |
---|---|---|
bool |
This property determines if a player is able to toggle Mouse lock by pressing Shift. A player can disable the mouse lock switch in Roblox's game settings. By default, this property is set to the value of StarterPlayer.EnableMouseLockOption. This can be set server-side during run-time 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.
Note that shift-lock related APIs are in the process of being deprecated, so it's recommended to use UserInputService.MouseBehavior instead to lock the mouse.
Thread safety | ReadSafe |
---|---|
Category | Camera |
Loaded/Saved | true |
History 9
- 578 Change Tags of DevEnableMouseLock from [Deprecated] to []
- 576 Change Tags of DevEnableMouseLock from [] to [Deprecated]
- 554 Change Default of DevEnableMouseLock from true to
- 553 Change Default of DevEnableMouseLock from to true
- 486 Change ThreadSafety of DevEnableMouseLock from ReadOnly to ReadSafe
- 462 Change ThreadSafety of DevEnableMouseLock from to ReadOnly
- 177 Add DevEnableMouseLock
- 176 Remove DevEnableMouseLock
- 177 Add DevEnableMouseLock
DevTouchCameraMode
Type | Default | |
---|---|---|
DevTouchCameraMovementMode |
The DevTouchCameraMode property determines the manner in which a player moves their camera when using a TouchEnabled device. See DevTouchCameraMovementMode for a description of each camera control mode available. 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.
When set to UserChoice, a player can choose between any control mode (except Scriptable) in the Roblox game settings. In general, it is a good idea to allow players to choose their control mode to maximize accessibility.
It's possible to create a custom control scheme by setting this property to Scriptable.
This property doesn't affect players who aren't using a touch-enabled device. See Player.DevComputerCameraMovementMode instead.
Thread safety | ReadSafe |
---|---|
Category | Camera |
Loaded/Saved | true |
History 7
- 554 Change Default of DevTouchCameraMode from UserChoice to
- 553 Change Default of DevTouchCameraMode from to UserChoice
- 486 Change ThreadSafety of DevTouchCameraMode from ReadOnly to ReadSafe
- 462 Change ThreadSafety of DevTouchCameraMode from to ReadOnly
- 177 Add DevTouchCameraMode
- 176 Remove DevTouchCameraMode
- 177 Add DevTouchCameraMode
DevTouchMovementMode
Type | Default | |
---|---|---|
DevTouchMovementMode |
The DevTouchMovementMode property determines the manner in which a player moves their character when using a TouchEnabled device. See DevTouchMovementMode for a description of each movement control mode available. 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.
When set to UserChoice, a player can choose between any control mode (except Scriptable) in the Roblox game settings. In general, it's a good idea to allow players to choose their control mode to maximize accessibility.
It's possible to create a custom control scheme by setting this property to Scriptable.
This property doesn't affect players who aren't using a touch-enabled device. See Player.DevComputerMovementMode instead.
Thread safety | ReadSafe |
---|---|
Category | Control |
Loaded/Saved | true |
History 7
- 554 Change Default of DevTouchMovementMode from UserChoice to
- 553 Change Default of DevTouchMovementMode from to UserChoice
- 486 Change ThreadSafety of DevTouchMovementMode from ReadOnly to ReadSafe
- 462 Change ThreadSafety of DevTouchMovementMode from to ReadOnly
- 177 Add DevTouchMovementMode
- 176 Remove DevTouchMovementMode
- 177 Add DevTouchMovementMode
DisplayName
Type | Default | |
---|---|---|
string |
The DisplayName
is a Player property that contains the display
name of the authenticated user associated with the Player object.
Unlike usernames, display names are non-unique names a player displays to
others. If the Roblox user has not chosen one, the property will read the
same as the Name
property.
Note:
- Since display names are non-unique, it's possible for two players in a single instance to have identical names. If you need a globally unique identifier for a player, use Player.UserId (which is static) or Player.Name (which is the current Username) instead.
- Characters generated with Player.LoadCharacter or by the Roblox engine will have their Humanoid.DisplayName property assigned to the Player.DisplayName property.
- Display names may have unicode characters in the string. See UTF-8 for more information on how to work with strings with unicode characters.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | false |
History 6
- 554 Change Default of DisplayName from to
- 486 Change ThreadSafety of DisplayName from ReadOnly to ReadSafe
- 462 Change ThreadSafety of DisplayName from to ReadOnly
- 428 Change WriteSecurity of DisplayName from RobloxScriptSecurity to None
- 428 Change ReadSecurity of DisplayName from RobloxScriptSecurity to None
- 291 Add DisplayName
DistanceFromCharacter
Parameters (1) | ||
---|---|---|
point | Vector3 | |
Returns (1) | ||
float |
The DistanceFromCharacter Player function returns the distance between the character's head and the given Vector3 point. It returns 0 if the player has no Player.Character.
This is useful when determining the distance between a player and another object or location in game.
If you would like to determine the distance between two non-player instances or positions, you can use the following:
1
|
|
Thread safety | Unsafe |
---|
History 2
- 462 Change ThreadSafety of DistanceFromCharacter from to Unsafe
- 47 Add DistanceFromCharacter
FollowUserId
Type | Default | |
---|---|---|
int64 |
The FollowUserId is a Player property that contains the Player.UserId of the user that a player followed into the game. If the player did not follow anyone into the game, this property will be 0. This property is useful for alerting players who have been followed by another player into the game.
You can get the name of the player followed using this user ID and the Players:GetNameFromUserIdAsync() function.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | false/true |
History 6
- 554 Change Default of FollowUserId from 0 to
- 553 Change Default of FollowUserId from to 0
- 486 Change ThreadSafety of FollowUserId from ReadOnly to ReadSafe
- 462 Change ThreadSafety of FollowUserId from to ReadOnly
- 323 Change ValueType of FollowUserId from int to int64
- 169 Add FollowUserId
FriendStatusChanged
Parameters (2) | |
---|---|
player | Player |
friendStatus | FriendStatus |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 483 Change Parameters of FriendStatusChanged from (player: Instance, friendStatus: FriendStatus) to (player: Player, friendStatus: FriendStatus)
- 462 Change ThreadSafety of FriendStatusChanged from to Unsafe
- 47 Add FriendStatusChanged
GameplayPaused
Type | Default | |
---|---|---|
bool |
The GameplayPaused 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. To determine the pause status, you can utilize this property.
See also:
- Workspace.StreamingEnabled which controls whether content streaming is enabled
- Workspace.StreamingIntegrityMode and StreamingIntegrityMode for more details on when gameplay is paused.
Write security | NotAccessibleSecurity |
---|---|
Thread safety | ReadSafe |
Category | Behavior |
Loaded/Saved | true |
History 8
- 554 Change Default of GameplayPaused from false to
- 553 Change Default of GameplayPaused from to false
- 486 Change ThreadSafety of GameplayPaused from ReadOnly to ReadSafe
- 462 Change ThreadSafety of GameplayPaused from to ReadOnly
- 386 Change WriteSecurity of GameplayPaused from None to NotAccessibleSecurity
- 386 Change Tags of GameplayPaused from [ReadOnly, NotReplicated] to []
- 386 Change CanLoad of GameplayPaused from false to true
- 384 Add GameplayPaused
GetFriendStatus
Parameters (1) | ||
---|---|---|
player | Player | |
Returns (1) | ||
FriendStatus |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 483 Change Parameters of GetFriendStatus from (player: Instance) to (player: Player)
- 462 Change ThreadSafety of GetFriendStatus from to Unsafe
- 47 Add GetFriendStatus
GetFriendsOnline
Parameters (1) | Default | |
---|---|---|
maxFriends | int | 200 |
Returns (1) | ||
Array |
This function returns a dictionary array of online friends, limited by the
maxFriends
value. The function uses 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 Player.UserId of the friend. | ||||||||||||||
UserName | string | The username of the friend. | ||||||||||||||
DisplayName | string | The Player.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 DataModel/JobId of the friend's last location. | ||||||||||||||
LocationType | number | The location type of the friend's last location:
|
Thread safety | Unsafe |
---|
History 4
- 462 Change ThreadSafety of GetFriendsOnline from to Unsafe
- 204 Change ReturnType of GetFriendsOnline from Dictionary to Array
- 204 Change Parameters of GetFriendsOnline from (maxFriends: int = 50) to (maxFriends: int = 200)
- 119 Add GetFriendsOnline
GetGameSessionID
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
string |
Security | RobloxSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of GetGameSessionID from to Unsafe
- 133 Add GetGameSessionID
GetJoinData
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Dictionary |
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 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 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. |
Members | array | An array containing the Player.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 string containing launch data specified in the URL the player clicks to join the experience. Only present if the URL contains launch data. |
GetJoinData and TeleportData
If a server initiates the Player's teleport, the dictionary that this method returns includes the player's teleport data. The Player: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(), Player:GetJoinData() only provides teleport data that meets the following security criteria:
- It's guaranteed to have been sent by a Roblox server in the past 48 hours.
- It's guaranteed to have been sent with this Player.
- The
SourcePlaceId
andSourceGameId
are guaranteed to be the place and universe the data was sent from. This means you can verify the teleport data came from an approved place.
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.
LaunchData
Contains the string embedded in the launchData URL parameter that the user clicked to join the experience. Only available on the first join. If the user teleports to another server, the data isn't included. If you need the data after a teleport, forward it manually as teleport data. You can only include LaunchData in direct join URLs, not URLs to the experience's page.
LaunchData is a URL parameter that you can create by adding
&launchData=abcd
to a URL, where abcd
is the data. Special characters
such as spaces must be URL encoded using HttpService:UrlEncode()
and are automatically decoded when the user joins the game. The decoded
launch data can't exceed 200 bytes. You can store more complex data as a
JSON string and decode it with HttpService:JSONDecode() on the
server.
This link joins the LaunchData sample place and starts the user in room 2:
https://www.roblox.com/games/start?placeId=6900305353&launchData=%7B%22roomId%22%3A%202%7D
You can also make sure that this link works for users without Roblox downloaded on their mobile devices by using the AppsFlyer version of the link. The above link would look like:
ro.blox.com/Ebh5?af_dp=https%3A%2F%2Fwww.roblox.com%2Fgames%2Fstart%3FplaceId%3D6900305353%26launchData%3D%257B%2522roomId%2522%253A%25202%257D&af_web_dp=https%3A%2F%2Fwww.roblox.com%2Fgames%2Fstart%3FplaceId%3D6900305353%26launchData%3D%257B%2522roomId%2522%253A%25202%257D
To build the AppsFlyer version of the link, you need to start the URL with
ro.blox.com/Ebh5?
and append the af_dp and af_web_dp parameters with the
URL encoded version of Link 1.
Don't store confidential information in the LaunchData because it's fully visible in the URL. Furthermore, the data might not be authentic because a user can modify the URL.
Thread safety | Unsafe |
---|
History 3
- 624 Change Tags of GetJoinData from [] to [CustomLuaState]
- 462 Change ThreadSafety of GetJoinData from to Unsafe
- 333 Add GetJoinData
GetMouse
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Mouse |
The GetMouse Player function 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.
The UserInputService service provides additional functions and events to track user input - especially for devices that do not use a mouse.
Note:
- This item must be used in a LocalScript to work as expected online.
- Following an update in July 2014, the mouse's icon can now be set with this method.
Thread safety | Unsafe |
---|
GetNetworkPing
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
float |
GetNetworkPing returns the 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.
Thread safety | Safe |
---|
History 3
- 562 Change ThreadSafety of GetNetworkPing from Unsafe to Safe
- 488 Change ReturnType of GetNetworkPing from int to float
- 481 Add GetNetworkPing
GetRankInGroup
Parameters (1) | ||
---|---|---|
groupId | int64 | |
Returns (1) | ||
int |
The GetRankInGroup Player function 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.
Using this in a Script, as opposed to a LocalScript, will not get you the most up-to-date information. If a player leaves a group while they are in the game, GetRankInGroup will still think they're in that group until they leave. However, this does not happen when used with a LocalScript.
This is because the method caches results, so multiple calls of GetRankInGroup 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.
Thread safety | Unsafe |
---|
History 3
- 462 Change ThreadSafety of GetRankInGroup from to Unsafe
- 323 Change Parameters of GetRankInGroup from (groupId: int) to (groupId: int64)
- 69 Add GetRankInGroup
GetRoleInGroup
Parameters (1) | ||
---|---|---|
groupId | int64 | |
Returns (1) | ||
string |
The GetRoleInGroup Player function returns the player's role in the group as a string, or Guest if the player isn't part of the group.
Using this in a Script, as opposed to a LocalScript, will not get you the most up-to-date information. If a player leaves a group while they are in the game, GetRoleInGroup will still think they're in that group until they leave. However, this does not happen when used with a LocalScript.
This is because the method caches results, so multiple calls of GetRoleInGroup 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.
Thread safety | Unsafe |
---|
History 3
- 462 Change ThreadSafety of GetRoleInGroup from to Unsafe
- 323 Change Parameters of GetRoleInGroup from (groupId: int) to (groupId: int64)
- 69 Add GetRoleInGroup
GetUnder13
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
bool |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of GetUnder13 from to Unsafe
- 83 Add GetUnder13
HasAppearanceLoaded
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
bool |
The HasAppearanceLoaded Player function returns whether or not the appearance of the player's Player.Character has loaded.
A player's 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 game, which can be tracked using the Players.PlayerAdded event.
Thread safety | Unsafe |
---|
History 2
- 462 Change ThreadSafety of HasAppearanceLoaded from to Unsafe
- 218 Add HasAppearanceLoaded
HasVerifiedBadge
Type | Default | |
---|---|---|
bool |
The HasVerifiedBadge Player property indicates if the player has a Verified Badge.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | false |
History 1
- 554 Add HasVerifiedBadge
HealthDisplayDistance
Type | Default | |
---|---|---|
float |
The HealthDisplayDistance Player 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.
Thread safety | ReadSafe |
---|---|
Category | Camera |
Loaded/Saved | true |
History 5
- 554 Change Default of HealthDisplayDistance from 100 to
- 553 Change Default of HealthDisplayDistance from to 100
- 486 Change ThreadSafety of HealthDisplayDistance from ReadOnly to ReadSafe
- 462 Change ThreadSafety of HealthDisplayDistance from to ReadOnly
- 147 Add HealthDisplayDistance
Idled
Parameters (1) | |
---|---|
time | double |
This event fires approximately two minutes after the game 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.
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.
Thread safety | Unsafe |
---|
IsBestFriendsWith
Parameters (1) | ||
---|---|---|
userId | int64 | |
Returns (1) | ||
bool |
This function was once used to return whether a player is best friends with the specified user, but the best friend feature has since been removed.
Thread safety | Unsafe |
---|
History 4
- 462 Change ThreadSafety of IsBestFriendsWith from to Unsafe
- 323 Change Parameters of IsBestFriendsWith from (userId: int) to (userId: int64)
- 206 Change Tags of IsBestFriendsWith from