OtherPlayers

OtherPlayers is not creatable, there's only one instance of it. It can only be accessed through its globally exposed variable.

OtherPlayers is a array containing all Players currently connected to the World, except the local one.

OtherPlayers is not available to the Server, because it just wouldn't make sense! 🙂

Player indexes in OtherPlayers are arbitrary, and may change as players join and leave.

-- print information about all other players:
for _, player in OtherPlayers do
  print(player.Username, player.UserID, player.ConnectionID)
end

-- another way to iterate:
for i = 1, #OtherPlayers do
  local player = OtherPlayers[i]
  print(player.Username, player.UserID, player.ConnectionID)
end