Check if a server still exists through JobId?

Is it possible to have a game.JobId stored and check if the server actually exists?

3 Likes

Could you elaborate on this some more?

Basically, if I have a servers jobid stored in a datastore, can I then check that the server with that jobid exists still or not?

1 Like

Interesting. Is this your way of having a server browser of some sort?
But from I can tell, not that I know of. But, take what I say with a grain of salt, as I do not have complete knowledge of API.

Hey @RVVZ!

So I am going to speculate on what it is you’re asking since you’re not very clear.

I’m taking what you mean to say "Is there a way to see if a server is still running via game.JobId

The answer is yes! Unfortunately you’ll likely not want to do it.

There is no built in roblox function to check if a server is still active from another server, which is what I presume you’re wanting. However you could utilize the MessagingService to create a look up table in every server of your game that lays out exactly what games there are, and what their JobId is.

Using this lookup table, from there you can simply look it up! If it’s there, it exists, if it’s not there, it does not!

Hope this helped!

I thought of that, it’s just messagingService is annoying because it is a long process that requires going through every server. @iGottic I’m actually trying to just make a system that stops players from reverting their data using multiple game instance exploit, basically a Session Locking system.

This can be done if GetPlayerPlaceInstanceAsync will return the server data from players userid, but I have a feeling it will just return the server data of the server the user is currently in.

I could store the JobId that the player is in using a simple datastore service, and when they leave it just removes it. However if they join a server and they still have it, it will check if the server exists (which is what I am at now), and if it does, it will kick them and not let their data load in.

2 Likes