Reserved Server Player Count

So recently I was trying to make a Sessions Hub for my training centre (in simple terms a server hub) now obviously the server hub has a maximum of 1 player to make things easier, however once the player goes into the big server I am trying to set the Maximum player count to 50, can someone help me achieve this please? I have already tried changing the value in game.Players.MaxPlayers hower this value cannot be changed.

2 Likes

Studio > Game Settings > Places

hmm. if you know how to set the Max of the hub (starting place) to be 1 player only, you should know how to set the Max of other places, right?

no but it uses the same experience it just reserves a server

It’s not possible to change game.Players.MaxPlayers dynamically in a live game session, you would change that via the game’s settings on the Roblox website under the Place Configuration. You can create reserved servers though to create a session hub with different player count limits like this `

local TeleportService = game:GetService("TeleportService")
local PlaceId = put your place ID here
local Players = game:GetService("Players")

local function CreateReservedServer()
    local ServerCode = TeleportService:ReserveServer(PlaceId)
    return ServerCode
end

local function TeleportPlayersToServer(players)
    local ServerCode = CreateReservedServer()
    TeleportService:TeleportToPrivateServer(PlaceId, ServerCode, players)
end

script.Parent.MouseButton1Click:Connect(function()
    local playersTable = {}
    for _, player in pairs(Players:GetPlayers()) do
        table.insert(playersTable, player)
    end
    if #playersTable > 0 then
        TeleportPlayersToServer(playersTable)
    end
end)

`

Hey, is this possible because what I am trying to accomplish is make the player count higher and skimming through your script shows me that you can just make it lower? Correct me if I am wrong.

You can’t have the same experience with a different max player count.

If you want a hub server, you need two places in the same game universe. Your hub server would be the primary then the game server would just exist in the universe. You would need to set the desired max players for each place, then use @moondowndontfrown code to help you teleport a user from the hub to the actual game.

On the creator hub, just click on the experience you want to edit, under configure go to places, then click add place. Whatever you set as the start place would be where users would join upon clicking play; however, if you want people to be forced to the hub, make sure Direct Access to Places is disabled on the game place otherwise friends could join friends without going to the hub.

2 Likes