How to check for the existence of a reserved server?

Hello all, I’m trying to find out how to check for the existence of a reserved server. Whether that is making use of the MessagingService or HTTPS, I do not know.
I’m trying to achieve having private servers in-game. Essentially VIP servers inside a game.

Any assistance is much appreciated, thank you.

Check out TeleportService ! With it you can reserver servers.

Hope that’s what you’ve searched for :wink:

Hey,
No unfortunately, this does not answer my question. I know how to reserve servers but checking for the existence of it is something else.

Why shouldn’t it exist? But if you would want to check, couldn’t you just use a simple if statement?

They become unavailable when the private server gets no players on it. I want to check for its existence from the start place game.

I don’t think you can. Maybe see TeleportInitFailed event, and you can try testing with an alt whether this faills or not when teleporting to a non existent server.

1 Like

To check whether the server you’re in is a reserved server, you can use the DataModel.PrivateServerId property.

However, there’s no way to find reserved servers from other servers, unless you save the reserved server’s ID into a DataStore or broadcast it via MessagingService when you create it.

3 Likes

That’s what I was a bit concerned about that since there’s no guarantee of the message going through?

I think you can save the unix/epoch time (os.time()) in a variable and then send a message through messaging service and then if you don’t get the message back from the server in for example 30 seconds, that means the server doesn’t exist anymore or it has no players in it.

Baically you send message “A” and you get back message “B” (with the same topic) and if the reserved server doesn’t respond that means it doesn’t exist.

3 Likes