MatchmakingService

Show Deprecated
Not Creatable
Service
Not Replicated

MatchmakingService is responsible for managing custom matchmaking attributes. Use it to read and write matchmaking data.

Summary

Methods

Properties

Methods

GetServerAttribute

Parameters

name: string

Returns

InitializeServerAttributesForStudio

Parameters

serverAttributes: Dictionary

Returns

SetServerAttribute

Parameters

name: string
value: Variant

Returns

Code Samples

MarketplaceService sample

local MatchmakingService = game::GetService("MatchmakingService")
local RunService = game:GetService("RunService")
if RunService:IsStudio() then
-- Sets up initial attributes and schema for testing
MatchmakingService:InitializeServerAttributesForStudio(
{
Level = "Advanced",
Elo = 123.456,
TrainingMode = true
})
end
-- Retrieves the Level attribute
local currentLevel, error = MatchmakingService:GetServerAttribute("Level")
if error then
print(error)
else
print("Current level: " .. currentLevel)
end
-- Updates the Level attribute value to Advanced
local success, error = MatchmakingService:SetServerAttribute("Level", "Advanced")
if not success then
print("Failed to update server attribute [Level] to [Advanced] due to error: " .. error)
else
print("Successfully set [Level] to [Advanced]")
end

Events