I’m currently trying to make a model dummy in my game play an animation endlessly, although this script isn’t working with no errors. Does anyone know how to fix it? If so, please let me know!
Script:
local animation = Instance.new("Animator")
animation.Parent = script.Parent.Humanoid
animation:LoadAnimation(script.Animation):Play()
Thank you in advance for your assistance with this, much appreciated!
local Animation = Instance.new("Animation")
Animation.Parent = script.Parent.Humanoid
local AnimationId = 0 -- Your AnimationId here
Animation.AnimationId = "rbxassetid://"..AnimationId
script.Parent.Humanoid:LoadAnimation(script.Parent.Humanoid.Animation):Play()
You can view the API Reference for animations here:
It’s still not working, if it’s working but only playing it once then I’m not noticing it because I’m loading in to the game. Maybe it’s because it’s not looping it? How would I loop it?