Aprender
Clase de motor
MatchmakingService
No creable
Servicio
No replicado

*Este contenido se traduce usando la IA (Beta) y puede contener errores. Para ver esta página en inglés, haz clic en aquí.


Resumen
Miembros heredados

Referencia API
Métodos
GetServerAttribute
Capacidades: Basic
MatchmakingService:GetServerAttribute(name:string):Tuple
Parámetros
name:string
Devuelve

InitializeServerAttributesForStudio
Capacidades: Basic
MatchmakingService:InitializeServerAttributesForStudio(serverAttributes:Dictionary):Tuple
Parámetros
serverAttributes:Dictionary
Devuelve

SetServerAttribute
Capacidades: Basic
MatchmakingService:SetServerAttribute(
name:string, value:Variant
Parámetros
name:string
value:Variant
Devuelve
Muestras de código
Ejemplo de MatchmakingService
local MatchmakingService = game:GetService("MatchmakingService")
local RunService = game:GetService("RunService")
if RunService:IsStudio() then
-- Configura los atributos iniciales y el esquema para pruebas
MatchmakingService:InitializeServerAttributesForStudio({
Level = "Avanzado",
Elo = 123.456,
TrainingMode = true
})
end
-- Recupera el atributo Level
local currentLevel, errorMessage = MatchmakingService:GetServerAttribute("Level")
if errorMessage then
warn(errorMessage)
else
print("Nivel actual: " .. currentLevel)
end
-- Actualiza el valor del atributo Level a Avanzado
local success, errorMessage = MatchmakingService:SetServerAttribute("Level", "Avanzado")
if not success then
warn("Fallo al actualizar el atributo del servidor [Level] a [Avanzado] debido a error: " .. errorMessage)
else
print("Se estableció correctamente [Level] a [Avanzado]")
end

©2026 Roblox Corporation. Roblox, el logotipo de Roblox y "Powering Imagination" son algunas de nuestras marcas registradas y no registradas en los Estados Unidos y otros países.