Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I've made a script to play an animation but the my loop isn't working at all. What I did wrong ?

Actual script is here :

local animation = script:WaitForChild('Sitting_idle')
local humanoid = script.Parent:WaitForChild('Humanoid')
local idle = humanoid:LoadAnimation(animation)
idle:play()
idle.Looped=true

2 comments

0

Make it looped in the animation editor

0

and humanoid:LoadAnimation is depricated. Go to the RobloxAPI and search AnimationTrack. Scroll down, copy the script.

3 answers

✓ Accepted answer
idle.Looped = true

This is actually local. Even if this is in a normal script, this only plays locally. But there's no player to even localize to, so it just breaks.

Fix: Go to the animation editor, moon animator, whatever you use. And try and locate 'Looped'. Just enable the looped then export it to Roblox. Should fix it. I had this problem like a day ago so you could've just looked at mine.

3 comments

0

Hi, sir I've tried and the my mistake was this. Thanks !

0

No problem, glad I could help!

0

No problem, glad I could help!

Maybe you have to loop it first and then to play the animation

1 comment

0

Hi sir, I've tried your suggestion but the animation is still not looping. Thanks btw !

This discussion is preserved as it was. New answers, comments, and votes are closed.