Hi. In the game called Catalog Avatar Creator, there’s a system that allows you to equip the items that you already own by prompting a request to the user. After some research, I found that you can do it using game:GetService("AvatarEditorService"):PromptSaveAvatar
function, but I didn’t found any tutorials showing examples of the script on the internet and video platforms, like YouTube. I also watched the documentation, but I don’t understand how it should to help me to do it. Please, help me if you can!
Can I please see an example of the script that I should to write?
it takes only 3seconds of research using just google
additional, this is an offical roblox api example docs for your refance
Alright, now I have another question. How can I check user’s inventory status (like if it’s private or not)?
And how can I change humanoid description?
you not reading
if you just want to check user’s inventory status : GetInventory() should do the job
Google before anything
ApplyDescription() would do the job
Alright, but how can I request to remove all player’s items from his avatar and equip a specific one? I tried writing this code, but it didn’t work:
wait(5)
local AvatarEditorService = game:GetService("AvatarEditorService")
AvatarEditorService:PromptAllowInventoryReadAccess()
local Result = AvatarEditorService.PromptAllowInventoryReadAccessCompleted:Wait()
if Result == Enum.AvatarPromptResult.Success then
local AvatarEditorService = game:GetService("AvatarEditorService")
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Humanoid = workspace:WaitForChild(Player.Name):WaitForChild("Humanoid")
local CurrentDescription = Humanoid:GetAppliedDescription()
AvatarEditorService:PromptSaveAvatar(CurrentDescription, Humanoid.RigType)
Result = AvatarEditorService.PromptSaveAvatarCompleted:Wait()
if Result == Enum.AvatarPromptResult.Success then
print("Successfully saved avatar!")
end
end
you didnt apply the description to humanoid
Because I can’t do that using LocalScript (Idk why)
then use it on serverside or sth
It says that it can be only called by the backend server
yes then just use on serverside