Hello. I want to play the cartoony idle animation so I took the animation id and put it on animation and wrote a script that plays animation but NOPE still not working it worked with other animations that I make what is going on?
the animation player script is
local anim = script.Parent:LoadAnimation(script.Parent.Animation)
anim:Play()
Is the parent a humanoid? If it is, Humanoid:LoadAnimation() isn’t now deprecated. Use Animator:LoadAnimation(), a child of the humanoid instead to play animations, unless the humanoid is an npc.
Seems like you forgot something, you’re supposed to check for/make the Animator before calling :LoadAnimation()
e.g
local function getAnimator(hum)
local animator = hum:FindFirstChildWhichIsA(“Animator”)
if (not animator) then
animator = Instance.new(“Animator”)
animator.Parent = hum
end
return animator
end
local animator = getAnimator(script.Parent)
animator:LoadAnimation(script.Parent.Animation):Play()
bruh when i tried to set the robot animation pack idle that i bought it didnt worked BUT when i took it from animate > idle > animation1 on my character in explorer it worked what is going on???
Is this an NPC or a player’s character? If this is a character the animation might be being played over. To avoid this, you should change the Animation inside the Animate script.
If this is an NPC I’d recommend giving us more code and a picture of your hierarchy.
I’d try setting the Looped property of your animation track to true if it’s an NPC. (Your animation track is called anim)