Code issues - NPCS Dance

Hello! what’s wrong in my code? :frowning:

i want to play this animation in my npcs:
(24) Carrera de Rthro - Roblox

script:

local animation = script.WvAnim

local humanoid = script.Parent.Parent.Humanoid

local dance = humanoid:LoadAnimation(animation)

dance:Play()

dance.Looped = true
1 Like

Your NPC is not anchored right? And do you know if the NPC is R6 or R15?

the npcs model anchored? it’s anchored now and it’s r6 :frowning:

Humanoid:LoadAnimation() is now deprecated. Use Animator instead. To create and Animator on the NPC, you can use the Instance.new() function.

1 Like

The animation you gave is on R15 so it probably doesn’t work because your NPC is R6, also the model shouldn’t be anchored

2 Likes

Oh i understand… thanks you guys :smiley: