CreateHumanoidModelFromUserId Doesn't Animate

I’m trying to create a character or NPC from a userId using…

local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Dummy = Players:CreateHumanoidModelFromUserId(Player.UserId)
Dummy:SetPrimaryPartCFrame(fooCFrame) --A CFrame where I have the Dummy
Dummy.Parent = workspace

The problem is that even though this Dummy has a humanoid, it doesn’t animate.
Thanks in advance!

1 Like

Do you have any Animate script in the Dummy?
If not, create one.

The model already comes with an Animate script. :/"

How are you animating the Humanoid?

Some more context would be great!

You’ll need the Animate script roblox offers (or create your own animations & script) in order for it to animate.
Place it in StarterPlayerScripts since localscripts doesn’t run in workspace if you’re using the default one.

Players:CreateHumanoidModelFromUserId returns a humanoid model with an Animate script pre attached, so I expect it to animate idle. I’ve even ran a command line to Dummy.Humanoid.Animator:LoadAnimation(Dummy.Animate.Idle.Animation1). It returned no errors but there were no animation.

If possible, I would like to see an example of an NPC generated via Players:CreateHumanoidModelFromUserId() and actively animating. I have no idea why it’s not working as it is supposed to.

This could be an issue with Animate script, so I made the animationtracks myself and :Play() them, and it worked!