Linker - Cross-Server Matchmaking in 3 lines

Introducing Linker: Cross-Server Matchmaking Library for Roblox Developers

:link: What is Linker?

Linker is a new Roblox library designed to facilitate cross-server matchmaking in your games. Whether you’re developing a battle royale, a team sports game, or any multiplayer experience, Linker simplifies the process of matching players across different servers.


:warning: DISCLAIMER

This library was developed primarily as a proof of concept to test the functionality of Roblox’s Messaging Service and, as such, contains only basic features. It has undergone minimal testing, primarily to validate core functionality. While it has worked in initial tests, please be aware that it is not extensively developed, and I do not currently plan to continue its active development or support. If you encounter any issues or have suggestions for improvements, feel free to leave a reply, but please note that updates and fixes may not be forthcoming.


:hammer_and_wrench: How to Get Started with Linker

  1. Installation: Get the module here — Linker.rbxm (4.7 KB)

  2. Setup: After importing, place the module in ReplicatedStorage.

  3. Usage: Create a new script in your game and require the Linker module.

Example code to integrate Linker:

local Linker = require(game:GetService("ReplicatedStorage").Linker)

Linker:CreateGameMode("TeamBattle", 100, function(playersInMatch)
    print("Match found for TeamBattle with 100 players", playersInMatch)

    -- Match start logic goes here
end)

-- Add player to queue for game mode "TeamBattle"
Linker:AddPlayerToQueue(player.UserId, "TeamBattle")

-- Remove player from queue
Linker:RemovePlayerFromQueue(player.UserId)
15 Likes

this fireeee, keep these updates going

1 Like

Ummm, what about the teleporting ?
Can it queue up duo teams?

1 Like

All of the logic once a match has been found is handled by the function passed as the third parameter of the Linker:CreateGameMode function.

When creating a game mode you pass the number of players the queue should wait for and a function that handles match found logic.


For the example, the game mode has 100 players so to make it duos you would just have to pass 2 instead of 100. Then to teleport the players, you would use the playersInMatch variable which is given by the function to get the user IDs of the players you want to teleport.

This would be the final script:

Linker:CreateGameMode("TeamBattle", 2, function(playersInMatch)
    for _, userId in ipairs(playersInMatch) do
        local player = Players:GetPlayerByUserId(userId)

        if player then
            local success, errorMessage = pcall(function()
                TeleportService:Teleport(placeId, player)
            end)

            if not success then
                warn("Failed to teleport player with UserId " .. userId .. ": " .. errorMessage)
            end
        else
            print("No player found with UserId: " .. userId)
        end
    end
end)
1 Like

ok, thanks…

I guess my question was not clear… like duos as in multiple teams of duos… so the server could have 100 total players, that are matched up as duo team players, so there would be 50 duo teams in the server of 100 players…

also when would it do the teleport, like say there could be 100 players, but right now only 50 are in the queue, is there a way of like after 50 players in queue do a count down for 30 seconds, and then teleport whoever is in the queue

also how does it know which server place to teleport to?

such as you have a main game that is the lobby, via asset manager you have another place that is the battlegrounds which has been added to the main game, how does it know to teleport them to the sub place battlegounds?

If by duos you mean being able to make parties with set people, that is not a feature as of now. However, a workaround could just be to split the players into teams of duos after the match has been found.

All logic after the match has been found is handled by the function you set when you create the gamemode. The only use of the module at this stage is to signal that a match has been found and to give the players that the match has been found for.

This means if you want to teleport the players to a different place, you would just have to specify the place within the function.

Very nice, simple module. Curious where this goes, any upcoming updates you can share? Would love to see this expanded with more features

(Sorry, it’s tough to view the code source as its uploaded), but are you accounting that multiple servers aren’t simultaneously creating matchmaking servers? Ex: three servers in a game are active, but three matchmaking games are then created too?

Yeah, I’m looking to add a ‘party’ functionality in the future where you would be able to queue multiple players in groups

The module only allows for 1 server to be the matchmaking host at a time, meaning unless the host server shuts down and a back up is elected as the new host, there is no way for another server to be the host

when you say ‘’ ‘party’ functionality" is this like what I was asking about for duos? i.e. a party of 2…

Yeah, but you could still have pseudo-parties by splitting players into teams after the match has been found.

This is great, but I think i’ll just use regular memory stores if I ever think about doing something like this. Because I like learning about stuff rather than getting the easy way out, not that your module is bad.

Yeah, memory stores would work a lot better, but this module was really just a means for me to test some of Roblox’s integrated features and as I said in the disclaimer, this module is not extensively developed and at the moment I don’t really plan on continuing its development. However, if i do end up continuing developing it, i will definitely have that in mind!

Hi,
What is the advantage of doing it with Memory Stores?

and is that using more memory on the local client device? or is it somehow cloud ?

Memory Stores are good for situations where you need quick, temporary data handling like managing player queues for example. They are basically useful for any environments that require real time updates and don’t need data saved after the session ends.

Well memorystoreservice is like one of the last services I have yet to learn so I’m about to learn about them but they allow you to send data quickly with low latency between servers.

You should add a skilled variable or make it so you can reject the player from the queue in the function like return false or true

Can you post the source code somewhere? I’m interested to see how the system works

Just download the rbxm file and look inside the module script