New API For Equipping Assets on Humanoid Player Avatars

avatar
humanoid
player

#102

If you’re talking about accessories (like hats, wings, etc) I’m pretty sure other users have already stated you can use custom models you have uploaded. You can keep them private and call them by ID from your games.


#103

I was thinking more along the lines of faces, for example the following code produces the following error:

local desc = humanoid:GetAppliedDescription()
desc.Face = 181776977
humanoid:ApplyDescription(desc)

Humanoid::ApplyDescription() Assets are incorrect for the Humanoid Description slots they have been assigned to

Thanks for the highlighting the trick with assets, I didn’t realise that before! After playing around with HumanoidDescriptions a bit more I’m finding they’re actually really useful.


#104

This is really useful! It’d be cool to be able to alter packages as well, though. In R15, I mean.


#105

What exactly is the reason for HumanoidDescription not working with StarterCharacters? My StarterCharacter is just a regular R15 character, so it’s not like there would be any problem with applying a HumanoidDescription to the character with Player::LoadCharacterWithHumanoidDescription()


#106

A much needed feature, all the recent updates are amazing.


#107

I think it’s because StarterCharacters are manually added, so there wouldn’t be any point in using the HumanoidDescription instance. I could be wrong though.


#108

This is very useful already but is there any chance this can be adapted to work with NPCs as well? It would be even more useful if it worked with them.


#109

I managed to get this to work with NPCs. All I did was copy the Animate script from my character and put it into the NPC as a Script. The NPC was inserted using the Animation Editor Plugin.

local description = game:GetService("Players"):GetHumanoidDescriptionFromUserId(22507135)
local humanoid = workspace.Dummy.Humanoid

delay(2, function()
	humanoid:ApplyDescription(description)
end)

If you call humanoid:ApplyDescription() immediately, it will error. But if you wait about two seconds, it will work sometimes.

Here is the place file:
ApplyDescriptionNPC.rbxl (29.4 KB)


#110

I attempted the same thing earlier but it didn’t work out for me. I probably shouldn’t have assumed my script ran after the animate one. Thank you so much! You just saved me hours from having to insert and store assets.


#111

Whenever I change the RightArm on the package, it drops any tool that the character was previously holding by de-welding the Handle.

It would be nice if it just put this back in the player’s backpack, or re-welded the handle instead.

I’m guessing this applies to SeatWelds as well. For now I’m just keeping track of any missing welds and re-adding them after using ApplyDescription

Not lua



#112

Shouldn’t these be Color3 instead of just Color?

image

This code won’t work

local BodyColorProperties = {'HeadColor','LeftArmColor','LeftLegColor','RightArmColor','RightLegColor','TorsoColor'}

local HumDescription = PlayerS:GetHumanoidDescriptionFromUserId(plr.UserId)
local BodyColor = Instance.new('BodyColors')
for i = 1, 6 do
	local v = BodyColorProperties[i]
	BodyColor[v] = HumDescription[v] -- BrickColor.new(HumDescription[v]) 
end

I know that I can do

BrickColor.new(HumDescription[v])

Color is expected to be BrickColor and Color3 is expected to be Color3, which in this case it’s inconsistent


#113

Questions:

  1. Can the HumanoidDescription be saved in a DataStore?
  2. Is this live on all platforms?

Feedback

  1. I would like to have the ability to specify custom accessories (those that are stored in my game only, and not uploaded to Roblox).

#114

Two things:

  • why can’t I use any decal as a face? :c
  • animations don’t work when they’re set to Standard in Game Settings, bug?

#115

You would have to make your own method of saving them (this could be done by making a dictionary where each index is the name of the property and the value is the current value of that property).


#116

Hmm, the R15 characters dying seems to be a thing with R15. Maybe it’s time to look at this old feature request again…


#117

I can confirm this happens as well.

I’ve found it most commonly occurs when applying descriptions using GetHumanoidDescriptionFromUserId(), where body parts differ from the previously applied body parts.

The bug appears to happen roughly every 1 in 10 and is quite a pain as some players get stuck in an endless loop of having the humanoid description applied on spawn then being killed immediately.


#118

This post was flagged by the community and is temporarily hidden.


#119

@ShapeDemBricks can that be of use for us ?
sounds great anyways.


#120

I’m not sure!
It’d only be useful for Legend of the Eldritch if it also supports custom rigs, but according to the API link, it seems like it doesn’t.

Could anyone let me know whether this system also supports custom rigs optimally? :slight_smile:
Other than that, seems like a great new system!


#121

@CalGamesDev Can you clarify how this new system handles custom characters? For example, say I have a two custom R15 characters: one is very tall, and one is very short (meaning that the skeletons have different bone / Motor6D spacing). If I use HumanoidDescription to switch between the two, can this new system handle such cases in which the bones / Motor6Ds are spaced differently?