Animation doesn't play when HRP is anchored?

So I have this npc that when I anchor the humanoidrootpart, it does not play an animation. Any help? When I unanchor it, and anchor it ingame, it works, so whats going on here? The only issue must be loading in?

1 Like

I don’t know what your use-case for needing an anchored NPC playing animations would be, but I can give 2 alternatives:

1. Weld the NPC’s HumanoidRootPart to an invisible anchored part.

2. Make use of BodyPosition and BodyGyro to keep it in place without anchoring anything.

2 Likes

I had the same issue, are you using Roblox’s animation script? If you port that script to a server script, it won’t work if the Humanoid Root Part is anchored, but if you need the animation to play while the HRP is anchored. Here’s my script I used. Put this script under The NPC.

local Character = script.Parent
local Humanoid = Character:WaitForChild(“Humanoid”)
local AnimationId = “rbxassetid://507770239” --Roblox’s Wave Animation.
local Animation = Instance.new(“Animation”,script.Parent.Humanoid)
Animation.AnimationId = AnimationId
local animationTrack = Humanoid:LoadAnimation(Animation)
animationTrack:Play()

This should make it work (Sorry I don’t really know how to put code in.)