Help with rigging and animations

Hello, today I made an character and I test it with my new script but… Surprise ! my script only works for mesh !
Okay, so this is my script ( works with mesh only )
local idle = nil

wait(2)

idle = script.Parent.AnimationController:LoadAnimation(script.Idle)

idle:Play()

while true do

wait(5)

script.Parent.pump.Sound:Play()

local call = script.Parent.AnimationController:LoadAnimation(script.Call)

call:Play()

end

image

And I test with with an roblox rig and doesn’t works, if you know how to make it for run the script please reply this message.

Other than the fact that AnimationControllers are deprecated, this code doesn’t look problematic unless you’re getting an error in your console which then that’d be helpful to include. This seems to be more of an issue with how you’ve rigged your model. Remember that animations adhere to strict hierarchies.

Please include more detail if you can. If the code is the problem, then please try debugging it and tracking down any errors or specific points where your code isn’t running. If the issue is with the animations failing to run or not running correctly then it’s an issue with your rig and more details about how you’ve rigged these models would be appreciated (and more images!).

Moved over to Art Design Support for now by the way. Rigging and animations questions belong in Art Design Support unless it’s specifically the code that’s the problem.

Look, I just put that with script and under it an aniamtion, on meshs works, but on rigs of roblox characters like mine or urs doesn’t, idk why.

I try to do another script but doesn’t works

local animation = script.Parent:LoadAnimation(script.Parent.IdlepRO)

wait (1)
– this is the time that the animation will start when you run the game
while wait(6)
– change the number to the animation length ( the time that it will last)

animation:Play()

end