Is there a way that you could view someones outfits they have saved on their avatar? I’m looking to make a game to wear and try on their outfits. Any help?
Load their character in studio w/ this plugin, then rename it to StarterCharacter and put it in the StarterPlayer folder.
Otherwise, you could use InsertService:LoadAsset for individual assets
@Capt_George @deedubbleyew I think the OP is asking on how to view the saved outfits as in Preset Costumes, not the current player’s clothing.
Oh, my bad.
Alright, then disregard my solution
For now, I believe that there’s no way to find out a player’s saved outfit. They are not meant to be accessible for developers and perhaps, stays there in Roblox’s own database.
So no, I don’t think there’s a way you could view someone’s collection of outfits, let alone trying it.
Okay I found a new thing. If you go into the docs for user avatars, you can send a get request to users/{userId}/outfits
I don’t think it’s impossible, as @Vulkarin 's outfitRenderer does exactly this. Maybe she might be able to reveal her secrets
@deedubbleyew @AbiZinho Well, if that’s the case, I’ll take back what I said. And the Roblox privacy system hiding inventory seem a bit more pointless now.
I just found the API to find out the outfits of any player.
https://avatar.roblox.com/v1/users/1/outfits?itemsPerPage=50
(switch 1 with the player’s UserId)
For example, let’s use my player.
Result:
{"data":[{"id":662002321,"name":"Neat Fedora Look","isEditable":true},{"id":658560842,"name":"Noob","isEditable":true},{"id":658546386,"name":"OG Costume","isEditable":true}...
(Note that id
represents the outfit’s id, and you would need to load the outfit using the id into the game.)
What does the numbers represent? It doesn’t seem to represent the shirt, pants, or the gears id.
And if it’s outfit id, how to load them into a character?
Yeah then you’d use the outfit id for https://avatar.roblox.com/docs#!/Outfits/get_v1_outfits_userOutfitId_details
Thanks for all your guys help. I really wouldn’t have known what to do to view their outfits.
You shouldn’t be able to view other people’s outfits from an another account using an API
Sorry to revive this topic.
I’m a bit confused how do I really load the outfit into Roblox Studio?
Let’s say I’ve got this outfit link which has information about the avatar, including avatar type, accessories, and shirts.
How do I load these accessories into a Roblox model?
Thanks.
Use:
local humanoid = workspace.Dummy.Humanoid
local desc = game.Players:GetHumanoidDescriptionFromOutfitId(outfitid)
humanoid:ApplyDescription(desc)
I don’t really know how but there are Roblox games in which u can see saved outfits so it is possible
Here’s an implementation that populates an array of a user’s saved outfits, specifically the IDs of said outfits. This array can then be iterated over in conjunction with GetHumanoidDescriptionFromOutfitId in order to create HumanoidDescriptions from the provided outfit IDs, ApplyDescription can then be used to apply those HumanoidDescriptions to player’s characters/NPCs.
local players = game:GetService("Players")
local http = game:GetService("HttpService")
local get = http.GetAsync
local jsonDecode = http.JSONDecode
local proxyUrl = "roproxy.com" --Put your proxy's domain here.
local baseUrl = "https://avatar."..proxyUrl.."/v1/users/%d/outfits?page=%d"
local function getUserOutfits(userId)
local outfits = {}
for pageNumber = 1, 2 do
local requestUrl = string.format(baseUrl, userId, pageNumber)
print(requestUrl)
local success, result = pcall(get, http, requestUrl)
if success then
if result then
local success2, result2 = pcall(jsonDecode, http, result)
if success2 then
if result2 then
for _, outfitItem in ipairs(result2.data) do
table.insert(outfits, outfitItem.id)
end
end
else
warn(result2)
end
end
else
warn(result)
end
end
return outfits
end
local function onPlayerAdded(player)
local outfitIds = getUserOutfits(player.UserId)
for _, outfitId in ipairs(outfitIds) do
print(outfitId)
end
end
players.PlayerAdded:Connect(onPlayerAdded)
Hey this is a bit far back in time but once I have an outfit ID what do I do to use it as like a starter character?