學習
引擎列舉
CreateOutfitFailure

*此內容是使用 AI(Beta 測試版)翻譯,可能含有錯誤。若要以英文檢視此頁面,請按一下這裡


概要

道具
名稱概要
InvalidName1
OutfitLimitReached2
Other3

Usage

範例程式碼

處理服裝創建結果
local AvatarEditorService = game:GetService("AvatarEditorService")
AvatarEditorService.PromptCreateOutfitCompleted:Connect(function(result, failureType)
if result == Enum.AvatarPromptResult.Success then
-- 服裝已創建
elseif result == Enum.AvatarPromptResult.PermissionDenied then
-- 用戶拒絕了提示;忽略 failureType
else -- Enum.AvatarPromptResult.Failed
if failureType == Enum.CreateOutfitFailure.OutfitLimitReached then
-- 告訴用戶他們達到了服裝上限
elseif failureType == Enum.CreateOutfitFailure.InvalidName then
-- 告訴用戶選擇不同的名稱
else -- Enum.CreateOutfitFailure.Other
-- 一般失敗;重試或顯示一般錯誤
end
end
end)
©2026 Roblox Corporation、Roblox、Roblox 標誌及 Powering Imagination 是我們在美國及其他國家地區的部分註冊與未註冊商標。