How would i create a Server Browser?

I want to create a server browser for my game, however, the current problem is that i don’t know where i need to start, i have questions such as if i need to use DataStore, MessagingService, or both.

I also searched in the devforum posts talking about this, but most of them are old, or not solved posts.

I’m not trying to ask for scripts, i just want to learn and know what i need to use to create a Server Browser, i need help with this, i’ll try to answer any question.

Thanks for reading. :+1:

7 Likes

I’m not sure if this is the best way, but I would have a datastore that (when a new server is opened) would add the server to a list. It would also be removed when the server is closed.

Then, every 15 - 60 seconds, I would load the datastore on all servers (You could do it more often, but every 15 seconds should be enough.) and update the server list on a server script. Then, you just need to update each player’s GUI (or whatever else you need) to show the changes.

I would not use a datastore as it could create a race condition

there are 2 way better options first https service (you will need a proxy but there are many ones free made for roblox). use this api

the second is messaging service, I’m sure you could figure that one out but https service will probably be the best way

Currently I use messaging service

2 Likes

@HayHaySun2 - Thanks! I got a question, how would i get every server key in datastore without reaching the request budget limits?

@mattchew1010 - Would you like to tell me any Roblox proxy? I didn’t find one in google.

@0x6e7367 - Would you like to share your idea about how to do a Server Browser with MessagingService?

Thanks for reading.

its a short link but i need 30 chars so how are you today?

On the other server I will use this code to determine if it’s open

local MessagingService = game:GetService("MessagingService")
local PlayerList = {}
if game:GetService("RunService"):IsStudio() then
	return
else
	function ServerListAdd(Player)
        PlayerList = {}
		for i,v in pairs(game.Players:GetChildren(Player)) do
			PlayerList[i] = v.Name
		end
		MessagingService:PublishAsync("ServerListM", {Players = PlayerList, ServerId = game.JobId})
		while wait(5) do
			for i,v in pairs(game.Players:GetChildren(Player)) do
				PlayerList[i] = v.Name
			end
			MessagingService:PublishAsync("ServerListM", {Players = PlayerList, ServerId = game.JobId})
		end
	end
	game.Players.PlayerAdded:Connect(function(Player) 
		if #game.Players:GetChildren() > 1 then
			return
		else
			ServerListAdd(Player)
		end
	end)
	MessagingService:SubscribeAsync("playerJoinedOnReq", ServerListAdd)
end

I really don’t know how to explain it

3 Likes

I don’t understand how to use the proxy, i tried to get the API you sent me with the proxy with the following link https://rprxy.xyz/proxy/v1/games/5519106179/servers/Public?sortOrder=Asc&limit=10, however, it’s an invalid link. How do i use the proxy? Thanks for reading.

1 Like

For instance you need to send a GET request to:
https://billing.roblox.com/v1/developer-exchange-rate

just change the domain from roblox.com to rprxy.xyz:
https://billing.rprxy.xyz/v1/developer-exchange-rate

3 Likes