Yuari
Documentation
Docs/Instances/GetPlayers

GetPlayers

All current players (from the Players service).

Syntax

:GetPlayers() -> table

Parameters

This function takes no parameters.

Returns

TypeDescription
table{Player}

Description

GetPlayers is part of the Instances library. Instances are live proxies backed by game memory. Property reads and method calls go through Roblox's own objects.

The call is read-only: it resolves the current value when invoked and does not change the underlying state.

Example

for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
    print(player.Name)
end

Notes

  • Instance proxies are backed by live game memory.