AvatarEditorService:PromptSaveAvatar() randomly fails and I can’t figure out why. When changing my outfit in-game, sometimes the function works successfully while other times it fails with no clear explanation as to why. Whether or not it fails to save an outfit seems to be a little random, while some outfits don’t seem to error.
I don’t think this is a bug. Most of the AvatarEditorService methods are prone to random failures like this since most of them make web requests, so you should use pcalls and listen to AvatarEditorService’s corresponding events to handle potential errors.
This happens way too often and isn’t based on how long I wait between requests. It isn’t wrapped in a pcall because I wasn’t done making it when I discovered this issue. I am using AvatarEditorService methods a lot in this system, this is the only one that fails like this that I have used. Even if I wrapped it in a pcall, it is very annoying for users that it would error this much.
Also, the outfit I equip seems to matter, as well as the fact that the next outfit I wear after won’t fail if it didn’t fail. But then if I switch between that next outfit and one of the other ‘failing outfits’, it will fail again. These are not truly random failures, but they are random in the sense that I can’t find any reason behind them. I only use ApplyDescription to apply assets to avatars, the HumanoidDescriptions should be fine to go through this method as they are fine to be worn by avatars in-game.
I found the source of my particular issue with this and why it was erroring. In my code I accidentally left something that was applying rigid accessories to avatars as if they were layered accessories. This, of course, caused issues with saving the description to the web.
Hopefully in the future we can have more clear warnings about why this function is failing, as this particular case felt confusing since avatars were working as normal in-game with seemingly no issues on the surface.