Services
Players
Access the current player list, the local player, and player join/leave signals.
Access
Luau
local Players = game:GetService("Players")Members
| Name | Type | Description |
|---|---|---|
LocalPlayer | Player or nil | The local Player when one exists. Online Studio playtests use the signed-in account. Offline Studio playtests use Player with PlayerID 0. |
PlayerAdded | signal | Fires when a Player is surfaced to the runtime and passes that Player. |
PlayerRemoving | signal | Fires when a Player is removed and passes that Player. |
GetPlayers() | table | Returns only current Player instances in a 1-indexed table, even when Players contains other child classes. |
GetChildren() | table | Returns every direct child, including Player instances and other classes parented to Players. |
FindFirstChild(name) | Instance or nil | Finds any direct child by name. |
Players.ChildName | Instance or nil | Missing service fields resolve direct children by name, for example game.Players.Player in an offline playtest. |
Player instances expose read-only
PlayerID, Platform and FramesPerSecond properties. Studio shows all three in the Properties panel while playtesting.Players can also contain authored ordinary Instances. Those authored children keep their hierarchy and are saved with the place, while runtime Player/PlayerGui/PlayerScripts/Character trees remain session-only and are never written into the authored place file. Parts stored below Players are not rendered or simulated because they are not descendants of Workspace.
Example: Get The Local Humanoid
Luau
local Players = game:GetService("Players")
local player = Players.LocalPlayer
if player then
print(player.PlayerID)
print(player.Platform, player.FramesPerSecond)
end
if player and player.Character then
local humanoid = player.Character:FindFirstChild("Humanoid")
if humanoid then
humanoid.WalkSpeed = 20
end
endExample: react to PlayerAdded
Luau
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
print(player.Name, player.PlayerID)
end)The playtest Player already exists before creator ServerScripts start, so Glorpia surfaces it through
PlayerAdded after scripts have had a chance to connect listeners.Studio Client and Server views
Players and the live Character hierarchy remain visible in both runtime views. Client view also exposes the local client CoreScripts. Server view hides CoreScripts while keeping Player, Character, Humanoid and body parts available for inspection.