How To Get Player's Saved Outfits?

Hello.

I am trying to get a player’s saved outfits. I’ve seen from previous/other DevForum posts that you can use the userId’s Outfits API, I just don’t know how it’s used. I do not have to be baby-fed with a script, I just want a short example or a source.

Here’s what I mean by “Player’s saved outfits”:

4 Likes

Use HttpService:GetAsync and JSONDecode.

Here’s a simple example I made which requests for the api url, but wouldn’t work because roblox doesn’t allow requests from their website.

local HttpService = game:GetService('HttpService')

local url = 'https://avatar.roblox.com/v1/users/userid/outfits'

local request = HttpService:GetAsync(url)
local decoded = HttpService:JSONDecode(request)

if not decoded.data then
return warn('Unable to get outfits.')
end
5 Likes

You use /v1/users/{userId}/outfits to get all the outfit ids for the user’s outfits and then you can use /v1/outfits/{userOutfitId}/details to get all the equipped items, body colors, avatar scale, etc. from that particular outfit id

7 Likes

Hey I know this I like two years later. But how would I convert the outfit details into a rig?

AvatarEditorService:GetOutfits to get data of the client’s outfits

Use the outfitIds to get descriptions using Players:GetHumanoidDescriptionFromOutfitId

Use the descriptions to Players:CreateHumanoidModelFromDescription

voila you have models for the client’s outfits

2 Likes