> For the complete documentation index, see [llms.txt](https://docs.easy.gg/scripting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.easy.gg/scripting/bedwars-scripting/services/playerservice.md).

# PlayerService

### Functions

#### getPlayers(): [Player](/scripting/bedwars-scripting/objects/player.md)\[]

Returns all players in the server

#### getNearbyPlayers(center: [**Vector3**](https://create.roblox.com/docs/reference/engine/datatypes/Vector3), radius: number): [Player](/scripting/bedwars-scripting/objects/player.md)\[] | nil

Returns players contained in the radius around the center position.

#### getPlayerByUserName(name: string): [Player](/scripting/bedwars-scripting/objects/player.md) | nil

Returns the player in the game server whose username matches the provided string.

#### getPlayerByDisplayName(name: string): [Player](/scripting/bedwars-scripting/objects/player.md) | nil

Returns the player in the game server whose display name matches the provided string.
