How can I achieve this ? Would i have to create reservedservers , but then how would i even check if a server a player tries to join is full , et cetera, i’d appreciate if anyone can lay out a understandable way how to achieve this.
You cant, lol it’s simple. ROBLOX does this automatically, you cannot create a new server-ingame, unless you use teleportservice to a new reserved server, that may be a idea.
But this is scripting support, we don’t script stuff for you, we fix / help to fix your code. Not make it for you.
If you’re just talking about the website’s server system, Roblox does it automatically for you.
If you’re talking about in-game queuing, lobbies, or something else involving generating servers, try looking into creating a matchmaking system utilizing MessagingService, or HttpService if you’re looking for off-site hosting.
Yes regarding teleportservice, I didn’t ask anyone to script it for me, however i’d appreciate if someone could tell me the steps to do such as which functions of teleportservice to use
Thank you, yeah like generating servers in a game, so for example if i join a game lobby, then a private server displayed on the UI has a max player of 12/12 and if a player still clicks join despite it showing 12/12 how would feedback be sent to the player to let them know the server is full? Is there like a way to catch teleport-service feedback errors or something
For example (taken from the teleportservice hub page.)
local DataStoreService = game:GetService("DataStoreService")
local TeleportService = game:GetService("TeleportService")
local ServerAccessCodes = DataStoreService:GetDataStore("ReservedServerAccessCodes")
local teleportOptions = Instance.new(“TeleportOptions”)
teleportOptions.ShouldReserveServer = true
local teleportResult = TeleportService:TeleportAsync(game.PlaceId, {player}, teleportOptions)
ServerAccessCodes:SetAsync(teleportResult.PrivateServerId, teleportResult.ReservedServerAccessCode)
local accessCode = game.PrivateServerId ~= "" and ServerAccessCodes:GetAsync(game.PrivateServerId)
Thanks, and then if a player were to want to join a reserved server it’d have to be taken from the datastore right, however what if that particular reserved server is full? does roblox have like a feedback within teleportservice to let the server know that the teleport failed, so then if it failed i can maybe check the next available code to try teleporting them to. Is it " TeleportInitFailed" that returns if a server is full?