PromptCreateAvatarAsync fails to validate head cages that successfully validate with Save To Roblox

When using PromptCreateAvatarAsync, head cage validation sometimes fails despite the cage being successfully validated in the Save To Roblox flow. I have included 4 heads that will guaranteed always reproduce this inconsistency.

These 4 heads will always fail validation with PromptCreateAvatarAsync but will always succeed validation with Save To Roblox.

4 unique dynamic heads.

All 4 FAIL PromptCreateAvatarAsync validation

All 4 SUCCEED Save to Roblox validation

Here is an example of one being prompted with the API then ending the simulation and subsequently using Save to Roblox on the same head successfully. I had to use Save to Roblox twice but it did validate the second attempt without changing anything.

This inconsistency always happens with this specific error:

Enum.PromptCreateAvatarResult.UGCValidationFailed UGC validation failed. Reason(s): A vertex was found on the Head’s cage mesh that is 0.54 studs away from the closest render mesh. 0.3 studs is the maximum. Make the cage mesh more closely match the shape and size of the render mesh.
Your asset could not be properly validated due to an internal error. If this issue persists, please create a bug report. ValidationJobId: {92e60688-34a2-4853-ac6c-b56b81a2daa6}

Although the amount of “studs away” isn’t always necessary 0.54, that can vary.

Here are screenshots of a head failing to validate in the avatar creation prompt but successfully validating in Asset Configuration.

Even though PromptCreateAvatarAsync failed with the “A vertex was found on the Head’s cage mesh that is x studs away…” error, I was able to validate with Save to Roblox, upload it, and it even passed moderation: Test Head


I have also included a head that actually does validate with PromptCreateAvatarAsync (WorkingHead.fbx) to prove my scripts work, the body validates, and the API is typically functional. Here is proof of that:

I’m not sure what the commonality is between the broken heads but the consistency in which they fail suggests there is something measurably wrong with them or the API. Out of all the heads I have ever tried, this happens about 3% of the time.

The private content includes a place file with all the aforementioned heads, a valid avatar body, and 3 scripts that will automatically prompt PromptCreateAvatarAsync if a head and the body are named correctly, are placed in ReplicatedStorage, and if the script is provided an avatar creation token. I have also included all the heads and the body as fbx files in case the API requires ownership of the body part or cage assets.

The heads have clearly definable facial features, blinking animations, and the mouth moves. The cages closely fit the head mesh and there has been no issues with landmark/expressions detection! It seems to only ever be this “cage distance” error giving me rare but consistent problems.

The cages are definitely NOT too far from the head mesh, I have measured them. I have stressed enough that they validate when manually saving them, but you can just look at the cages too. They are certainly not 0.3 studs away from any part of the head mesh.

While these doodles make good test assets, I would love to invest time in making beautiful and functioning faces for use with PromptCreateAvatarAsync but I’m afraid this rare validation hiccup will deter customers. I suppose it could be a result of how I’m authoring head cages but that wouldn’t explain why they consistently validate with Save to Roblox. Thank you for considering this issue.

Here are the recreations steps. The private files include a place file with everything already in them but incase you are required by the API to import the models and textures, here is what to import:

  1. If asset ownership is necessary, import the “BodyTest” fbx.

  2. If importing the BodyTest fbx, delete the Head from the imported BodyTest and place in ReplicatedStorage.

  3. If importing BodyTest, import TemplateTorso_transparent.png and TemplateLimb_transparent.png as well and set the limb and torso textures to their asset ID’s in the module “AvatarColorMaps”.

  4. If asset ownership is necessary, import any failed head fbx. Ensure you import the color texture to see the face and the normal texture so the head gets a SurfaceAppearance. Textures should be packed with the fbx but I have included the corresponding color map and an ordinary normals texture seperately in case they dont appear when importing.

  5. If importing the head fbx, change the SurfaceAppearance AlphaMode to “Overlay”. (this is always required to pass validation)

  6. If importing the head fbx, add a StringValue named “AvatarPartScaleType” with Value “Classic” to the head. You can also just copy and paste any of the AvatarPartScaleTypes from the BodyTest’s body parts. (this is always required to pass validation)

  7. If importing the head fbx, rename the head “HeadTest”.

  8. If importing the head fbx, place the “HeadTest” into ReplicatedStorage.

  9. Attempt regular validation with “Save To Roblox”. This should validate the head successfully.

  10. Ensure you have the “PromptCreateAvatarHeadTest” script in ServerScriptService.

  11. Set the “AVATAR_CREATION_TOKEN” variable in the PromptCreateAvatarHeadTest to an avatar creation token.

  12. Start the game. The script should automatically run. It will assemble the HeadTest to the BodyTest and in a few moments prompt a purchase.

Check the Output for the result. If testing the working head, it may take a few attempts or you have to wait a few minutes for some reason. I think because of “CDN propagation”?

System info and beta features attached to private content.

Expected behavior

Ideally head cages would validate according to the system used by Save To Roblox. My heads always validate when using “Save To Roblox”! It’s only when using PromptCreateAvatarAsync do they ever fail.

A private message is associated with this bug report