local Players = game:GetService("Players")
Players.CharacterAutoLoads = false
local function onPlayerAdded(player)
local humanoidDescription = Instance.new("HumanoidDescription")
humanoidDescription = Players:GetHumanoidDescriptionFromOutfitId(126)
player:LoadCharacterWithHumanoidDescription(humanoidDescription)
end
Players.PlayerAdded:Connect(onPlayerAdded)
This is a very simple script that applies a HumanoidDescription instance to a player’s character model when they join the game. The error line is the function Players:GetHumanoidDescriptionFromOutfitId(). When I run the code, the output gives me a HTTP 400 BAD REQUEST error. The ID 126 is from this Roblox bundle from the Avatar Shop. Did I use the function correctly? How do I get the ID of an outfit to use this function?
The bundle itself is not an outfit, however it contains one:
local AssetService = game:GetService("AssetService")
local outfitID: number = 0
local bundleDetails = AssetService:GetBundleDetailsAsync(126)
for _,item in bundleDetails.Items do
if item.Type == "UserOutfit" then
outfitId = item.Id
break
end
end
print(`The outfitId is {outfitId}`)