MatchmakingService
作成できません
サービス
複製されていません

*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。


概要

継承されたメンバー

APIリファレンス
方法
GetServerAttribute
機能: Basic
MatchmakingService:GetServerAttribute(name:string):Tuple
パラメータ
name:string
戻り値

InitializeServerAttributesForStudio
機能: Basic
MatchmakingService:InitializeServerAttributesForStudio(serverAttributes:Dictionary):Tuple
パラメータ
serverAttributes:Dictionary
戻り値

SetServerAttribute
機能: Basic
MatchmakingService:SetServerAttribute(
name:string, value:Variant
パラメータ
name:string
value:Variant
戻り値
コードサンプル
マッチメイキングサービスのサンプル
local MatchmakingService = game:GetService("MatchmakingService")
local RunService = game:GetService("RunService")
if RunService:IsStudio() then
-- テストのために初期属性とスキーマを設定します
MatchmakingService:InitializeServerAttributesForStudio({
Level = "Advanced",
Elo = 123.456,
TrainingMode = true
})
end
-- Level属性を取得します
local currentLevel, errorMessage = MatchmakingService:GetServerAttribute("Level")
if errorMessage then
warn(errorMessage)
else
print("現在のレベル: " .. currentLevel)
end
-- Level属性の値をAdvancedに更新します
local success, setErrorMessage = MatchmakingService:SetServerAttribute("Level", "Advanced")
if not success then
warn("サーバー属性[Level]を[Advanced]に更新できませんでした。エラー: " .. setErrorMessage)
else
print("[Level]を[Advanced]に正常に設定しました")
end

©2026 Roblox Corporation。Roblox(ロブロックス)、RobloxロゴおよびPowering Imaginationは、米国並びにその他の国における登録商標および非登録商標です。