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

Unable to cast value to Object?

Asked by 3 years ago

I am trying to make the animation loop and it plays once, but because of the error it doesn't loop and stops the script. Help?

local animation = script:WaitForChild('Animation')
local hum = script.Parent.Humanoid
local animationtrack = hum:LoadAnimation(animation)
animationtrack:Play()
animationtrack.Looped = true

1 answer

Log in to vote
0
Answered by 3 years ago

There is no looped value inside of the Animation, to make the animation loop, open the animation again (on a dummy or player model), and click the loop button (arrow thingy with play button in middle). After doing that, click export and overwrite the existing asset (bottom left). Hope this helped! Let me know if it doesn't work.

0
Thank You! NeoDogez 18 — 3y
Ad

Answer this question