Im making a game where you Have a GUI where you can create your own server or join others with this script that works perfectly fine to create a server.
I want to get a list of avaible Servers using the ReserveServer and but it on the players Gui.
Script to Create the Server WORKS
local TeleportService = game:GetService("TeleportService")
local placeId = 000000000000
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(plr,Type)
if Type == "Create" then
local player = game.Players[""..plr.Name..""]
local access = game:GetService("TeleportService"):ReserveServer(placeId)
game:GetService("TeleportService"):TeleportToPrivateServer(placeId,access,{player})
end
end)
Script to Join Server DOESNT WORK
local TeleportService = game:GetService("TeleportService")
local placeId = 0000000
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(plr,Type)
if Type == "Join" then
local player = game.Players[""..plr.Name..""]
local access = game:GetService("TeleportService"):ReserveServer(placeId)
game:GetService("TeleportService"):TeleportToPrivateServer(placeId,access,{player})
end
end)
Is there a way i can retrieve a List of all the avaible servers?

1 comment
I don't know if there is a legitimate way, but record all the private servers created in a list and then when you want to get the full list, use Messaging service to get more lists from all the other servers and then you can combine the lists to get one whole script with all the private servers. Hope this helps!