Animating Script is not working for my R15 rig model

Ok so i made a R15 Rig Model with some hats, I am trying to animate it but my animation script are not working. What should I do with the script to animate it or there are any other ways to animate it?

Vid:

And here is the script i wrote but its not working

Script

local hum = script.Parent:WaitForChild("Humanoid")
local loaded = hum:LoadAnimation(script.Animation)
loaded.Looped = true
loaded:Play()

Please help if you know how to solve this problem i appreciate it :smiley:

Shouldn’t this be done on the client side?

1 Like

Oh i guess i messed up lol, but idk how to animate it

The same way, but instead you should have the script in startercharacterscripts and get the humanoid from the character.

1 Like

Humanoid:LoadAnimation is deprecated. It needs to have an animator to load the animation now. So Humanoid.Animator:LoadAnimation(). Also, if the animation priority is movement, it automatically loops. I don’t think it needs to be client side as most of my animation scripts are server side and they work fine. Also, is the animation you want to play in the script? Because script.Animation references to animation within the script.

1 Like

Ohhh, ty now ik what is the problem on my script now