New API For Equipping Assets on Humanoid Player Avatars

avatar
humanoid
player

#81

For standard R15 rigs, it works fine for me. Are you using a custom rig/character?


#82

No, I’m not using a custom rig.


#83

Does LoadCharacterWithHumanoidDescription work? I’d guess it replaces all body parts of your avatar which would kill you.


#84

It should not kill you, but there is an issue now where it will do sometimes - we’re looking into this issue now


#85

I tried a few of their examples, and some of them don’t work as mentioned, here’s how I do mine:

players.PlayerAdded:Connect(function(ply)
ply.CharacterAdded:Connect(function(character)
	local humanoid = character and character:FindFirstChildOfClass("Humanoid")
	if humanoid then
		humanoid.Died:Connect(function()
			wait(1)
			local humanoidDescriptionForUser = game.Players:GetHumanoidDescriptionFromUserId(ply and ply.UserId)
	
			humanoidDescriptionForUser.Head = -1
			
			ply:LoadCharacterWithHumanoidDescription(humanoidDescriptionForUser)
		end)
	end
end)
local humanoidDescriptionForUser = game.Players:GetHumanoidDescriptionFromUserId(ply and ply.UserId)

humanoidDescriptionForUser.Head = -1

ply:LoadCharacterWithHumanoidDescription(humanoidDescriptionForUser)

end)


#86

Do you do anything special when spawning your avatar? If not, could you give me your userId and I can check if maybe the issue is specific to your current avatar set-up?


#87

Nothing special. My user ID is 1907709, but it happened to my friend too. It probably only happens if the Head or UpperTorso get swapped with a new block.

If I change from using ID 1 to using my own, I won’t die. I’ll check if changing the ID to someone else’s who also has no packages on won’t kill me.


#88

thanks!


#89

With the code provided above, if I grab a description for the user ID’s 1 or 3 I can die, but not if I use user ID 2. The account with user ID 2 has the same UpperTorso as me, whereas the other two don’t.


#90

thanks, that’s great info


#91

Any plans to allow this API to work with NPCs? I have a character customization script in my game that I use to edit assets on both players and NPCs, and I’d love to use this API but it doesn’t make sense to write a separate system that uses this if I still have to keep my older system so I can customize NPCs.

(The current error I get when working with NPCs is “Humanoid::ApplyDescription() cannot be used when the StarterPlayer or Animate script has been overriden”)


#92

Great for creating 3d leaderboards. Nice for easily cloning characters too.


#93

we’re considering what features to add to it. We may make it more generic to work with NPC’s and custom starter player characters, but no firm plans as yet


#94


Wow this is cool, check out this funny use case i found for it.

#95

cool


#97

Well, now I have to fix all my coding to fit this new system since I used to just weld the hats to the player cause that was the only way to do it. At least this new feature will be a lifesaver in the future! :sweat_smile:


#98

This will be really helpful in changing characters appearances. Thank you for this great update!


#99

As already stated above, when you use the ApplyDescription function and originally have a different UpperTorso from the new HumanoidDescription there is a chance of your character dying, only occurring sometimes. I’ve also ran into the problem of BodyScale not being applied correctly, as seen in the picture (also inconsistent). In addition to these problems, I’ve also found that you are able to apply shirts & t-shirts using the pants property (sometimes resulting in a naked character) and vice-versa. I’ve only experimented with the accessories, clothing, scale, and body color properties so I’m assuming there’s more bugs given how new the feature is. All of these bugs occurred when cloning my existing description (using GetAppliedDescription), changing a property, and applying the cloned description with the new properties. Great feature, just extremely buggy at the moment.


#100

Thanks for the feedback. All these issues are being looked into. The character dying one will be fixed in the next studio/client release


#101

How come we’re limited to assets from the catalog?

A lot of developers often combine assets from both the catalog and library when morphing avatars and NPCs (such as custom faces).

I’d love to get on board with this new API, however it seems impractical to do so if it requires having two systems just to use assets from the library.