So I’ve been using moon animator to make a small looping animation I want to use for a NPC, but for some reason, the animation would only play once, even though I set looped on true. Can someone please help me fix this small problem? Thank you for reading.
Did you loop the animation with-in the Moon Animator? That can also be the case, and it’s easily forgettable as it’s not a setting you can set to automatic (same goes for the priority of the animation!).
Also, just to also say with the script, I believe you should set the Looped to true before playing it. It’s another simple mistake.
local animation = Animation
local humanoid = Humanoid
local dance = humanoid:LoadAnimation(animation)
-- so instead of doing...
dance:Play()
dance.Looped = true -- because you can't modify a playing animation
-- you would do this
dance.Looped = true
dance:Play()
--[[ you actually modify the track BEFORE playing it anyway, this goes with these as well:
dance:AdjustSpeed()
dance:AdjustWeight()
it's okay, we makes mistakes (like I do!). glad I was able to help you though, good luck on your game!
]]