Hello, I’m creating a script where a NPC will display an animation always, but it won’t loop. It just plays but never loops.
I’ve searched in the Developer Hub for a solution but it just shows how to play and not loop, or it’s for the player and not a Non-Player Character.
This is the script I am using:
local Seated = Instance.new("Animation")
Seated.AnimationId = "rbxassetid://4895897244"
local animController = Instance.new("AnimationController", script.Parent)
local SeatedTrack = animController:LoadAnimation(Seated)
SeatedTrack:Play()
SeatedTrack.Looped = true
How do I loop the animation?