学ぶ
エンジンクラス
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, errorMessage = MatchmakingService:SetServerAttribute("Level", "Advanced")
if not success then
warn("[Level] を [Advanced] に更新する際にエラーが発生しました: " .. errorMessage)
else
print("[Level] を [Advanced] に正常に設定しました")
end

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