Skip to content

How to get Players in an Instance

Getting Player Count

1
2
3
4
-- Pull get the number of users in an instance
... = PlayerAPI.PlayerCount
-- You can also use:
... = #PlayerAPI.AllPlayers

Getting All Players

1
2
-- Pull in all the users in an instance, including you.
... = PlayerAPI.AllPlayers

Getting All Remote Players

1
2
-- Pull in all the users in an instance, excluding you.
... = PlayerAPI.RemotePlayers

Local Player

1
2
-- Get just you.
... = PlayerAPI.LocalPlayer