Outfit Spawner using HttpService

I want to make it so you can write a player name and it spawns all of their saved outfits, like the game Outfit Renderer.

I tried to use the Avatar API to get a Humanoid Description but I don’t know if that worked:

I’ve tried using this but I am getting the error above. This is my code I’m using: A gui to write a player name, then it fires a remote event, here’s the code for the event:

game.ReplicatedStorage.RemoteEvents.LoadOutfits.OnServerEvent:Connect(function(player, sid)
	local HttpProxy = require(script.Parent.Modules.HttpProxyService)
	local id = game.Players:GetUserIdFromNameAsync(sid)
	local page = "1"
	local desc = game.HttpService:JSONEncode(HttpProxy:GetAsync("https://avatar.roblox.com/v1/users/"..id.."/outfits?page="..page.."&itemsPerPage=1"))
	local npc = game.ServerStorage.NPC:Clone()
	npc.Parent = workspace
	npc.Humanoid:ApplyDescription(desc)
end)

I don’t know if I’m using an efficient way to achieve this, but if anyone knows any possible solutions that would be great.

Hello!
The data that you are getting from the Api is just a table looking like this:

So in order to load the HumanoidDescription, you’ll need to get an ID of the targeted outfit from the table that you have obtained from the Api and then you’ll need to load the actuall HumanoidDescription using Players:GetHumanoidDescriptionFromOutfitId().
When you get the actuall HumanoidDescription, you are able to use the Humanoid:ApplyDescription() while passing the HumanoidDescription as an argument.

Hope this answer was understandable and helpful,
have a nice day!

Sadly I can’t get the ID from the table because the API says it failed to fetch because nil, (screenshot of page below), if/when I’m able to fix that, do I access the table by:

local desc = game.HttpService:JSONEncode(HttpProxy:GetAsync("https://avatar.roblox.com/v1/users/"..id.."/outfits?page="..page.."&itemsPerPage=1"))
print(desc)
local oidp1 = desc[0]
local oid = oidp1[id]
local hdesc = game.Players:GetHumanoidDescriptionFromOutfitId(oid)
local npc = game.ServerStorage.NPC:Clone()
npc.Parent = workspace
npc.Humanoid:ApplyDescription(hdesc)

?
Or is there a different way to access it?

Oh, I’m sorry, I haven’t looked into the error enough, I have tried to make request on the Api and I saw this problem that I have mentioned, I’ll try looking into this more, but just now I think there might be some problem with the proxy module.

Yeah I’ve just looked on the post and saw that people are having trouble using it now, thanks for the help! It means a lot.