Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How would I get a list of all active servers for a place?

Asked by
Dog2puppy 168
6 years ago

So I'm trying to make a game, where you start in a hub before the game. In the hub, I have Join Random Server, but I would like to have a list of all active servers, and if a friend in in a server, then recommend it to the player. I have looked through the wiki, but have found nothing. I know it's possible, because Auto Duels was able to do it.

0
No, auto duels has the battles in the same place hiimgoodpack 2009 — 6y
0
wouldn't have to do this if roblox didnt remove server lists JustLookingUpROCK333 0 — 6y

1 answer

Log in to vote
0
Answered by
blowup999 659 Moderation Voter
6 years ago

You can try this which creates a datastore that has the GameID of every single server in the other place in the Universe

in the main place do

local ds = game:GetService("DataStoreService"):GetGlobalDataStore()
local servers = ds:GetAsync("Servers")

in the other place do

local ds = game:GetService("DataStoreService"):GetGlobalDataStore()
local servers = ds:GetAsync("Servers")
if servers == nil then
    servers = {}
end
table.insert(servers, game.GameID)
ds:SetAsync("Servers", servers)
0
Thanks. Then I can just remove the server when the server shuts down. Dog2puppy 168 — 6y
Ad

Answer this question