Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 2 years ago

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
0
Make it looped in the animation editor Krektonix_Youtube 85 — 2y
0
and humanoid:LoadAnimation is depricated. Go to the RobloxAPI and search AnimationTrack. Scroll down, copy the script. Krektonix_Youtube 85 — 2y

3 answers

Log in to vote
0
Answered by 2 years ago
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.

0
Hi, sir I've tried and the my mistake was this. Thanks ! Thom01170 7 — 2y
0
No problem, glad I could help! Krektonix_Youtube 85 — 2y
0
No problem, glad I could help! Krektonix_Youtube 85 — 2y
Ad
Log in to vote
0
Answered by 2 years ago

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

0
Hi sir, I've tried your suggestion but the animation is still not looping. Thanks btw ! Thom01170 7 — 2y
Log in to vote
0
Answered by 2 years ago

Have you tried setting the Looped property by using the loop button on Animation Editor?

Like this (Image)

Answer this question