New API For Equipping Assets on Humanoid Player Avatars

avatar
humanoid
player

#1

Hey Developers,

A new HumanoidDescription Instance and accompanying API has been released to make it easier to swap assets in and out of Humanoid Avatars. The HumanoidDescription Instance allows you to specify the assets required for an avatar, as well as scale and body colors. The new API allows you to apply these HumanoidDescriptions to a player avatar. New functions include:

Players:GetHumanoidDescriptionFromUserId(userId) - get a HumanoidDescription with all the assets for a specified character

Players:GetHumanoidDescriptionFromOutfitId(outfitId) - get a HumanoidDescription with all the assets for a specified outfit

Player:LoadCharacterWithHumanoidDescription(humanoidDescription) - spawn an avatar so it has everything equipped in the passed in HumanoidDescription

Humanoid:ApplyDescription(humanoidDescription) - apply a new set of assets, scales, and body colors to a Humanoid Avatar

Humanoid:GetAppliedDescription() - get the last HumanoidDescription applied to a Humanoid (or the HumanoidDescription created for the avatar when it was spawned)

Example usage could be, spawn a Humanoid Avatar looking like another Humanoid Avatar:

player:LoadCharacterWithHumanoidDescription(game:GetService("Players"):GetHumanoidDescriptionFromUserId(userId))

Or make one Humanoid Avatar look like another:

humanoid:ApplyDescription(otherHumanoid:GetAppliedDescription())

See the full tutorial here: https://developer.roblox.com/articles/humanoiddescription-system

As always, check out the latest build of Roblox, try your hand with our new Instance and API, and then come back and tell us what you think in the comments below.

Thanks,

The Roblox Team


More Efficient Way to Apply Bodycolor to Player?
Player:ClearCharacterAppearance() does not clear worn head
Is there a way to remove packages from an R15 rig?
January Monthly Recap: the Developer Community Kicks Off 2019
How would I go about changing the StarterCharacter in-game?
#2

Long awaited update. This will be very useful for manipulating characters with ease in-game, thank you!


#3

I saw this the other day and was curious to know what it was… glad to see it here! Thanks for the useful feature.


#4

:clap: :clap: :clap: Thank you so much for this! Changing the appearance of characters used to be such a tedious process. Very excited to try this out.


#5

This is definitely making a lot of stuff so much easier. A long time need, thank you so, so much!


#6

I actually started making a character UI literally yesterday, so this is perfect timing.


split this topic #7

15 posts were merged into an existing topic: Off-topic and bump posts


#8

THANK YOU! Working with characters has always been a task, this will make things a lot easier! :tada:


#9

This is amazing now we doesnt need to make the code ourselfs anymore.
This will be really helpfull in my character creation script.
Great job guys!


#11

Does this mean I gotta update my Auto Updating NPC model :eyes:


#12

no, if you’re not using the new API, no existing functionality will be impacted


#14

Considering games as of late have been editing avatars recently, this API is very helpful to facilitate character changes. This, I assume, will also quell the long-frustrating issue of attempting to modify R15 character bundles without them dying or trying to use hacky methods to change bundles.


#15

Following up with my thoughts after using it, I clearly didn’t put enough of these in my previous post. :clap: :clap: :clap: :clap:

You guys considered everything. I just uploaded a model of a blackvalk hat accessory and put the model ID into the descriptions as a hat and it worked! I’m so happy to see this can be used with custom made assets that are uploaded as models. Thank you, again!


#16

I’m getting an error when trying to use Players:GetHumanoidDescriptionFromUserId(). I restarted Studio, and Instance.new("HumanoidDescription") works fine, but the previously mentioned method still errors.


#21

The only time I get an error with it is when the ID I put in isn’t a real user ID (< 1 or > the current highest user ID). What code is throwing the error for you?

Edit: Seems to not work for banned user ID’s either.


#24

I’m always super happy to see new API additions! I really like this one too!

It’s nice to see a much easier way to create a standardized character appearance. Although I will probably still rely on attaching parts to characters I might consider using this to create a few “preset base avatars” for a game to create a more consistent experience.

One small suggestion: I’m not a fan of reusing the Configuration instance icon. For visual clarity it would make more sense to me to have it be a folder with the top part of the humanoid icon shrunk and peeking out.

Overall this is super exciting though!


#25

This will go well with my quantum physics :yum:

No but in seriousness, this is a really cool update. I won’t have to rely on InsertService making a ton of requests for one of my games.


#26

Since you brought it up, I think it would make more sense if the icon was the humanoid icon with a gear beside. A folder doesn’t really make sense when this object isn’t meant to contain other instances inside it.


#28

+1 to this.

I’m not sure the best solution but I’m liking the concept of the Humanoid Icon with a gear at the bottom right

to be consistent with the Silk icon set design. Now if only I could emulate the Silk style to make additional custom Silk icons without paying for them…


#31

Finally some asset equipping fixes!!! been waiting for this for awhile now. Should make life easier :smiley: