I’m trying to do match making, and I want a way to display total players globally waiting for a match. Atm I only know of GetRangeAsync, but it caps at 200
ideally, I’d want it to be accurate, so if there were 500+ players in a queue, it’d specifically say that number
-- Get the number of players currently in the queue for a room
function MatchmakingService:GetPlayersInQueue(room)
local RoomMap = self.Maps[room]
if not RoomMap then
return 0
end
-- Get all players in the queue
local Success, Result = pcall(function()
return RoomMap:GetRangeAsync(Enum.SortDirection.Ascending, 200)
end)
if Success then -- Return the count of players in the queue
return #Result
else
warn("Failed to get players in queue: " .. tostring(Success))
return 0
end
end