学ぶ
エンジンクラス
AvatarEditorService
作成できません
サービス

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


概要
方法
GetBatchItemDetails(itemIds: {any},itemType: Enum.AvatarItemType):{any}
非推奨
GetFavorite(itemId: number,itemType: Enum.AvatarItemType):boolean
非推奨
GetInventory(assetTypes: {any}):InventoryPages
非推奨
GetOutfitDetails(outfitId: number):Dictionary
非推奨
GetOutfits(outfitSource: Enum.OutfitSource,outfitType: Enum.OutfitType):OutfitPages
非推奨
GetRecommendedAssets(assetType: Enum.AvatarAssetType,contextAssetId: number):{any}
非推奨
GetRecommendedBundles(bundleId: number):{any}
非推奨
PromptCreateOutfit(outfit: HumanoidDescription,rigType: Enum.HumanoidRigType,outfitOptions: Dictionary,outfitType: Variant):()
PromptSetFavorite(itemId: number,itemType: Enum.AvatarItemType,shouldFavorite: boolean):()
SearchCatalog(searchParameters: CatalogSearchParams):CatalogPages
非推奨
継承されたメンバー

APIリファレンス
方法
CheckApplyDefaultClothing
非推奨

CheckApplyDefaultClothingAsync
イールド
機能: AvatarAppearance
AvatarEditorService:CheckApplyDefaultClothingAsync(humanoidDescription:HumanoidDescription):HumanoidDescription
パラメータ
humanoidDescription:HumanoidDescription

ConformToAvatarRules
非推奨

ConformToAvatarRulesAsync
イールド
機能: AvatarAppearance
AvatarEditorService:ConformToAvatarRulesAsync(humanoidDescription:HumanoidDescription):HumanoidDescription
パラメータ
humanoidDescription:HumanoidDescription

GetAccessoryType
AvatarEditorService:GetAccessoryType(avatarAssetType:Enum.AvatarAssetType):Enum.AccessoryType
パラメータ
avatarAssetType:Enum.AvatarAssetType

GetAvatarRules
非推奨

GetAvatarRulesAsync
イールド
AvatarEditorService:GetAvatarRulesAsync():Dictionary
戻り値

GetBatchItemDetails
非推奨

GetBatchItemDetailsAsync
イールド
機能: AssetRead
AvatarEditorService:GetBatchItemDetailsAsync(
itemIds:{any}, itemType:Enum.AvatarItemType
パラメータ
itemIds:{any}
戻り値

GetBundlesByAssetIdAsync
イールド
機能: AssetRead
AvatarEditorService:GetBundlesByAssetIdAsync(
assetId:number, limit:number
パラメータ
assetId:number
limit:number
既定値: 10
戻り値

GetFavorite
非推奨

GetFavoriteAsync
イールド
機能: Players, AssetRead
AvatarEditorService:GetFavoriteAsync(
itemId:number, itemType:Enum.AvatarItemType
パラメータ
itemId:number
戻り値

GetHeadShapesAsync
イールド
機能: Players, AssetRead
AvatarEditorService:GetHeadShapesAsync():{any}
戻り値
コードサンプル
オーナーになっているヘッドシェイプの取得
TEST
local AvatarEditorService = game:GetService("AvatarEditorService")
AvatarEditorService:PromptAllowInventoryReadAccess()
local result = AvatarEditorService.PromptAllowInventoryReadAccessCompleted:Wait()
if result == Enum.AvatarPromptResult.Success then
local shapes = AvatarEditorService:GetHeadShapesAsync()
for i, shape in ipairs(shapes) do
print(i, shape)
end
end

GetInventory
非推奨

GetInventoryAsync
イールド
機能: Players, AssetRead
AvatarEditorService:GetInventoryAsync(assetTypes:{any}):InventoryPages
パラメータ
assetTypes:{any}
コードサンプル
期限切れアイテムの検索
local AvatarEditorService = game:GetService("AvatarEditorService")
local pages = AvatarEditorService:GetInventoryAsync({ Enum.AvatarAssetType.Hat })
local currentPage = pages:GetCurrentPage()
for _, item in currentPage do
if item.ExpirationTime then
local secondsLeft = item.ExpirationTime.UnixTimestamp - DateTime.now().UnixTimestamp
local hoursLeft = math.floor(secondsLeft / 3600)
if hoursLeft < 24 then
warn(string.format("%s は %d 時間後に期限切れになります", item.Name, hoursLeft))
end
end
end

GetItemDetails
非推奨

GetItemDetailsAsync
イールド
機能: AssetRead
AvatarEditorService:GetItemDetailsAsync(
itemId:number, itemType:Enum.AvatarItemType
パラメータ
itemId:number
戻り値
コードサンプル
アイテムの有効期限の確認
local AvatarEditorService = game:GetService("AvatarEditorService")
local details = AvatarEditorService:GetItemDetailsAsync(105589844216517, Enum.AvatarItemType.Asset)
if details.ExpirationTime then
local secondsLeft = details.ExpirationTime.UnixTimestamp - DateTime.now().UnixTimestamp
local hoursLeft = math.floor(secondsLeft / 3600)
if hoursLeft < 24 then
warn(details.Name .. " は24時間以内に期限切れになります!")
end
end

GetOutfitDetails
非推奨

GetOutfitDetailsAsync
イールド
機能: AssetRead
AvatarEditorService:GetOutfitDetailsAsync(outfitId:number):Dictionary
パラメータ
outfitId:number
戻り値

GetOutfits
非推奨

GetOutfitsAsync
イールド
機能: Players, AssetRead
AvatarEditorService:GetOutfitsAsync(
outfitSource:Enum.OutfitSource, outfitType:Enum.OutfitType
パラメータ
outfitSource:Enum.OutfitSource
既定値: "All"
outfitType:Enum.OutfitType
既定値: "All"
戻り値

GetRecommendedAssets
非推奨

GetRecommendedAssetsAsync
イールド
機能: AssetRead
AvatarEditorService:GetRecommendedAssetsAsync(
assetType:Enum.AvatarAssetType, contextAssetId:number
パラメータ
contextAssetId:number
既定値: 0
戻り値
コードサンプル
帽子のおすすめを取得する
local AvatarEditorService = game:GetService("AvatarEditorService")
local assets = AvatarEditorService:GetRecommendedAssetsAsync(Enum.AvatarAssetType.Hat, 9255093)
for _, asset in ipairs(assets) do
print(asset.Item.Name)
end

GetRecommendedBundles
非推奨

GetRecommendedBundlesAsync
イールド
機能: AssetRead
AvatarEditorService:GetRecommendedBundlesAsync(bundleId:number):{any}
パラメータ
bundleId:number
戻り値

PromptAllowInventoryReadAccess
機能: Players, AssetRead
AvatarEditorService:PromptAllowInventoryReadAccess():()
戻り値
()

PromptCreateOutfit
機能: Players, PlatformAvatarEditing
AvatarEditorService:PromptCreateOutfit(
outfit:HumanoidDescription, rigType:Enum.HumanoidRigType, outfitOptions:Dictionary, outfitType:Variant
):()
パラメータ
outfitOptions:Dictionary
既定値: "nil"
outfitType:Variant
戻り値
()

PromptDeleteOutfit
機能: Players, PlatformAvatarEditing
AvatarEditorService:PromptDeleteOutfit(outfitId:number):()
パラメータ
outfitId:number
戻り値
()

PromptRenameOutfit
機能: Players, PlatformAvatarEditing
AvatarEditorService:PromptRenameOutfit(outfitId:number):()
パラメータ
outfitId:number
戻り値
()

PromptSaveAvatar
機能: Players, PlatformAvatarEditing
AvatarEditorService:PromptSaveAvatar(
humanoidDescription:HumanoidDescription, rigType:Enum.HumanoidRigType
):()
パラメータ
humanoidDescription:HumanoidDescription
戻り値
()

PromptSetFavorite
機能: Players, PlatformAvatarEditing
AvatarEditorService:PromptSetFavorite(
itemId:number, itemType:Enum.AvatarItemType, shouldFavorite:boolean
):()
パラメータ
itemId:number
shouldFavorite:boolean
戻り値
()

PromptUpdateOutfit
機能: Players, PlatformAvatarEditing
AvatarEditorService:PromptUpdateOutfit(
outfitId:number, updatedOutfit:HumanoidDescription, rigType:Enum.HumanoidRigType
):()
パラメータ
outfitId:number
updatedOutfit:HumanoidDescription
戻り値
()

SearchCatalog
非推奨

SearchCatalogAsync
イールド
機能: AssetRead
AvatarEditorService:SearchCatalogAsync(searchParameters:CatalogSearchParams):CatalogPages
パラメータ
searchParameters:CatalogSearchParams
戻り値
コードサンプル
時間指定オプションを持つアイテムの検索
local AvatarEditorService = game:GetService("AvatarEditorService")
local params = CatalogSearchParams.new()
params.SalesTypeFilter = Enum.SalesTypeFilter.TimedOptions
params.Limit = 10
local pages = AvatarEditorService:SearchCatalogAsync(params)
local results = pages:GetCurrentPage()
for _, item in results do
if item.TimedOptions then
for _, option in item.TimedOptions do
local days = option.Duration / 86400
print(string.format("%s: %d 日で %d R$", item.Name, days, option.Price))
end
end
end

イベント
PromptAllowInventoryReadAccessCompleted
機能: Players, AssetRead
AvatarEditorService.PromptAllowInventoryReadAccessCompleted(result:Enum.AvatarPromptResult):RBXScriptSignal
パラメータ

PromptCreateOutfitCompleted
機能: Players, PlatformAvatarEditing
AvatarEditorService.PromptCreateOutfitCompleted(
result:Enum.AvatarPromptResult, failureType:Variant
パラメータ
failureType:Variant

PromptDeleteOutfitCompleted
機能: Players, PlatformAvatarEditing
AvatarEditorService.PromptDeleteOutfitCompleted(result:Enum.AvatarPromptResult):RBXScriptSignal
パラメータ

PromptRenameOutfitCompleted
機能: Players, PlatformAvatarEditing
AvatarEditorService.PromptRenameOutfitCompleted(result:Enum.AvatarPromptResult):RBXScriptSignal
パラメータ

PromptSaveAvatarCompleted
機能: Players, PlatformAvatarEditing
AvatarEditorService.PromptSaveAvatarCompleted(
result:Enum.AvatarPromptResult, humanoidDescription:HumanoidDescription
パラメータ
humanoidDescription:HumanoidDescription

PromptSetFavoriteCompleted
機能: Players, PlatformAvatarEditing
AvatarEditorService.PromptSetFavoriteCompleted(result:Enum.AvatarPromptResult):RBXScriptSignal
パラメータ

PromptUpdateOutfitCompleted
機能: Players, PlatformAvatarEditing
AvatarEditorService.PromptUpdateOutfitCompleted(result:Enum.AvatarPromptResult):RBXScriptSignal
パラメータ

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