How to get idle animation from UserId?

I want to load the avatar and the idle animation from a player to another character using their UserId.

Both GetHumanoidDescriptionFromUserId and GetCharacterAppearanceInfoAsync give me the id, but the one you get in marketplace. For example, for the “Rthro Idle” animation I get the animation id “2510235063”. But this id can’t be used to play the animation. They give the error:
“Failed to load animation with sanitized ID rbxassetid://2510235063: AnimationClip loaded is not valid.”
The animation id I need for this one is “10921259953” or “10921258489”.

I tried to get the animation id from GetHumanoidDescriptionFromUserId and GetCharacterAppearanceInfoAsync. Looked on google and on other posts from here but didn’t find anything.

Here is my script:

local Success, Result = pcall(function()
	return Players:GetHumanoidDescriptionFromUserId(UserId)
end)

if not Success then
	warn("Error while getting avatar description for " .. UserId .. ": " .. Result)
	return
end

local NewHumanoidDescription = Result
DummyToApplyThisTo.Humanoid:ApplyDescription(NewHumanoidDescription)

local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://" .. NewHumanoidDescription.IdleAnimation

Animation.Parent = Animator
Animator:LoadAnimation(Animation):Play()
1 Like

It still dosent give me the right id.
Failed to load animation with sanitized ID rbxassetid://411591771: Animation failed to load, assetId: https://assetdelivery.roblox.com/v1/asset?id=411591771&serverplaceid=0

1 Like

Pretty sure Roblox does not expose any API that returns another user’s HumanoidDescription or their animation IDs. The IDs you see on a character are just mock copies, so they won’t lead you back to the original items or animations anyways.

1 Like

It’s possible to get the animation ids by loading the asset directly:

local asset = game.InsertService:LoadAsset(assetId)
asset.Parent = workspace --so you can see the instances

After looking at the instances it loads you can figure out how to fetch the ids/animations. For this specific scenario, the two ids you mentioned are stored under the path asset.R15Anim.idle as two animation instances holding the correct ids. There’s also a third animation stored under asset.R15Anim.pose.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.