'Reserve' a Server

Is there a function to reserve a Server (so that TeleportService would ignore these Reserved Servers and not Teleport Players to them)?

Is this what I need: TeleportService | Roblox Creator Documentation? If yes then how can I use it (code examples etc.).

1 Like

You can disable the script by right-clicking the script, and disabling it

Yes, but :ReserveServer only returns a code for a reserved server. You have to use TeleportService | Roblox Creator Documentation to actually teleport the players though. Also the pages provide code samples for you.

Can you provide some examples as it is not 100% clear to me how to use the code provided there?

Like: TeleportService:ReserveServerAsync() or any functions (I just want TeleportService to ignore those Reserved Servers and that’s it)?

1 Like

That is not really what I mean

since disabling Script does not ‘Disable’ a Server / prevent Players from joining it.

I don’t understand what you mean by that, are you trying to prevent people from joining the same Reserved Server?

If you to prevent players from joining your game then just private the game altogether, unless you mean something else

i don’t think you get what he means, he means he wants a reserved server like a free VIP of sorts.

anyways apologies for the energy I gave off, I assume you want it reserved so if you go onto the reserve page like you showed, you get the code such as this.

(note this is on the page)

local TS = game:GetService("TeleportService")
local Players = game:GetService("Players")
 
local code = TS:ReserveServer(game.PlaceId) -- Returns a code
local players = Players:GetPlayers() -- Get a list of all players
 
TS:TeleportToPrivateServer(game.PlaceId,code,players) -- Actually teleport the players
-- You could add extra arguments to this function: spawnName, teleportData and customLoadingScreen

Yes I am. And I do not mean kicking them. For example there is 10 Reserved Servers. New Player joins. New Server should be created for him since there is no normal Servers left.

There’s a plugin for this, i forgot the name though but it’s really useful

@DigitalCopies @DumbHeadEdison

I am going to explain you my situation so it’s clear what I need.

I wanted to make a GUI for admins where they close game for updates. Admin GUI fires a cross - server message. The message gets read on all game servers. These game servers (if they are old version servers) reserve their server (since nobody can join and nobody gets teleported onto the server), teleport all players on the server to the menu and after 15 seconds (if the server is still running) it kicks the players who left.

I just want to know a code for ‘reserving’ such a server (something like turning a game server a VIP but not owned by anybody).

lemme get a video for this i heard of a “soft shutdown on youtube” please search for that.

I have already checked it out, that’s not what I like to use since my game would use a custom made system (I can check out soft shutdown’s code if it does have anything for reserving server rather than just teleporting players who join).

I am curious what this does (it probably reserves a custom game server and not current).

it makes it reserved just like a vip but it’s not.

Ohh, if you want to send global messages, try MessagingService | Roblox Creator Documentation.
Basically, all you need is MessagingService | Roblox Creator Documentation and MessagingService | Roblox Creator Documentation.

What you need to do is:
Once the GUI button is clicked, you will need to use PublishAsync.
Then, in a ServerScript or something you will need to use SubscribeAsync. The pages above will tell you about everything you need to know about the functions.

But it reserves not a current server and returns a code to it so you can teleport players there.

But the problem is that I need this server to reserve and make it not join - able anymore.

I am asking about reserving a server since I know everything except actually preventing TeleportService to make players join a reserved server.

You can run ReserveServer again to generate a new code so that other players won’t use the same Reserved Server Code and teleport to that same server.

What do you mean by this as I don’t really understand (since I think that ReserveServer reserves a random, not current, game server returning a code that allows people to join that random server using returned code - of course done by scripts)?