Engine Enum
CreateOutfitFailure
Items
| Name | Value | Summary |
|---|---|---|
| InvalidName | 1 | |
| OutfitLimitReached | 2 | |
| Other | 3 |
Code Samples
Handling Outfit Creation Results
local AvatarEditorService = game:GetService("AvatarEditorService")
AvatarEditorService.PromptCreateOutfitCompleted:Connect(function(result, failureType)
if result == Enum.AvatarPromptResult.Success then
-- Outfit was created
elseif result == Enum.AvatarPromptResult.PermissionDenied then
-- User declined the prompt; ignore failureType
else -- Enum.AvatarPromptResult.Failed
if failureType == Enum.CreateOutfitFailure.OutfitLimitReached then
-- Tell the user they hit the outfit cap
elseif failureType == Enum.CreateOutfitFailure.InvalidName then
-- Tell the user to pick a different name
else -- Enum.CreateOutfitFailure.Other
-- Generic failure; retry or show a generic error
end
end
end)