New API For Equipping Assets on Humanoid Player Avatars

Where has this feature been all my life?

Is it still in Beta or it works perfectly for a new released feature?

Is this feature reliable?

5 Likes

It’s released.

Not with R15. I finally tried it with R15 a moment ago and 3/5 times it got used I died. Very unreliable for that at the moment.

5 Likes

Thank you for the Info.

It’s a pretty good feature nonetheless but they need to fix the part where the Player dies because of it.

5 Likes

https://developer.roblox.com/api-reference/class/HumanoidDescription

This page is missing all of the Funtions for it.

I’m not sure what OutfitId is and where to get it which is used for this GetHumanoidDescriptionFromOutfitId

and for Body Parts and Animation

we get the Ids from this right? https://developer.roblox.com/api-reference/function/AssetService/GetBundleDetailsAsync


@Extuls, I’m impatience but these Information is suppose to be available from the get go, but I think you would be able to answer my questions.

6 Likes

Would be nice if trying to use it on characters with overridden Animate scripts would throw an exception or ignores attempts to overwrite animations instead of throwing an error. I was planning on using this since it makes a couple things much cleaner in my project, but cannot because of how it currently handles with StarterPlayer and StarterCharacter scripts.

I assume this fix is planned, but am voicing that I’d appreciate it if there was more adaptability with the object sooner rather than later!

6 Likes

It seems that, since this update, a new folder will be created under StarterPlayer named ‘HumanoidDefaultAssets’

image

Considering the API is used with a HumanoidDescription and doesn’t use such a folder structure, and the folder is only used to store arbitrary data (it’s not replicated into the Player/Character), StarterPlayer seems like an odd location. Why is this information added to the data model and not kept in one of the existing player scripts?

8 Likes

we’re looking into the bug causing players to die. Do you have any consistent repro steps?

6 Likes

I see, but for example I MUST use new animation script for my own needs.
I would love if HumanoidDescription could just ignore animations.

6 Likes

Can you apply custom accessories saved as models or does this only work with Roblox-made accessories?

5 Likes

I have used my own decal for a face and it loaded.
Trying someone else’s offsale decal didn’t load. I believe it needs to be inserted pretty much like original content.

6 Likes

I’m sure that’s intended; it most likely uses InsertService which only lets you insert models that you own – was just wondering if I saved an Accessory as a model if it would error or actually let players equip the it. Pretty neat that it works with custom decals also.

6 Likes

Yeah, I saw someone test it with an accessory.
Since it has InsertService behavior, you must own it (of course).

Packages probably need the same model hierarchy.

6 Likes
local players = game:GetService("Players"):GetPlayers()
local description = game:GetService("Players"):GetHumanoidDescriptionFromUserId(1)
for i = 1, #players do
	local character = players[i].Character
	if character then
		local humanoid = character:FindFirstChildOfClass("Humanoid")
		if humanoid then
			humanoid:ApplyDescription(description)
		end
	end
end

I ran that code in the developer console 10 times just now as an R15 character on a blank baseplate and all 10 times I died.

10 Likes

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

4 Likes

No, I’m not using a custom rig.

8 Likes

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

6 Likes

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

11 Likes

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)

6 Likes

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?

6 Likes

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.

5 Likes