Character model not animated when using CreateHumanoidModelFromUserId method

I am loading a character model using CreateHumanoidModelFromUserId, which works as intended, except the character does not properly animate (on the server or client side) despite having an Animate script inside of the character. Is there any workaround to this?

1 Like

Could you provide more background to this issue? Like what you are using this function for?

I’m loading a character with the appearance of a player using the method, and then moving it around with Humanoid:MoveTo(). This works as intended, except for the animations of the character which do not play.

Are you using Roblox’ own Animate script?

If so, that is your issue. Roblox’ Animate script is a local script. Local scripts only run in very specific locations, one of which are the local player’s character. However, since you are creating a character that doesn’t belong to any client, the local script is never ran.

Is there any reliable or effective way to convert that LocalScript into something that will work, either a LocalScript that’s somewhere outside of the character (like in StarterPlayerScripts) or a regular Script?

Sorry for the late reply, but an alternative solution would be to take a roblox rig and load the character appearance using GetHumanoidDescriptionFromUserId() and Humanoid:ApplyDescription(), which is completely animatable.
Server side script:

— example script
local char = game.ServerStorage:FindFirstChild(“rig”)
local clone = char:Clone()
clone.Parent = workspace

local ID = game.Players.LocalPlayer.UserId 
— send this data via a remote event

local desc = game.Players: GetHumanoidAppearanceFromUserId(ID)

clone.Humanoid:ApplyDescription(desc)

(I’m on mobile, sorry for bad formatting)

You will likely need to write your own code for triggering the appropriate animations. If you are creating and moving the character on the server, you can simply create a script to handle animations, and clone it into the character. If you are doing this on the client, you can do the same, but set the RunContext of the script to Client.