How would you be able to control and create Servers?

DISCLAIMER

This may already have a DevFourm post but I tried to search keywords from this post and could not find anything. If this has already been answered please guide me to the post so I can find out on how to do this.

Hello everyone! Hope you are having a good day so far.

I have a question that revolves around scripting that I have been struggling to answer for weeks now. I have seen other games that have been able to create and control servers freely, if you don’t understand what I mean then the games that have their own private server Game pass. I think that this would use Messaging Service but I am still unsure of all the details.

I tried looking at tutorials on Messaging Service but they only taught me how to send strings over to eachother. If anyone could help me it would be very appreciated!

Thanks in advance

2 Likes

Private server gamepass? Vip Servers already exist, unless you want to open a new server for another reason

No I mean I want to be able to see and control all running servers and maybe out it into a GUI in-game that the player can click on to go to that desired server

I reckon there were server lists in a few games that I know using this functionality. However, I still have no exact clue how they actually manage to index all the list. Perhaps it was a hacky HttpService method from Roblox API.

Its vague when you say “controlling servers” can you specify what you want to achieve specifically?

I want to be able to collect all the job ids of servers. To control I mean to just see the running servers and retrieve information from them

The messaging service is indeed a part of the solution to this.

The other parts to the solution is using reserved servers to create the servers, then using the teleport service you can send players to these servers with the JobIDs received from the messaging service.

Getting a server list from messaging service:

  • Send a request through messaging service
  • Other servers read this request and then send their data

you will need to use if statements when checking the received message in order to do this. I use what I call data tags, which basically tags the data to determine what is done with it

--(Message would be a string that is turned into an array)
if Message[1] == "ServerDataRequest" then -- Reply to request
    -- Get Server Data
    -- Send it through the messaging service
end
if Message[1] == "ServerDataResponse" then -- collecting response data
   -- Add Data To Server List
end

If you use a tagging system like this you can even use it for many different things on the same channel.

Messaging service can be exploited so don’t use it to do anything like kick, ban or teleport between servers.

Tutorials will not make a good scripted. Instead learn to interpret the API as this covers literally everything in more depth that some outdated YouTuber that only shows you how to do things their way, not to say they are wrong but often they are basic.

1 Like