I created this animation function so when called it will play the animation with some parameters.
function Animate(animationID, looped)
local animation = Instance.new("Animation")
animation.AnimationId = animationID
local animator = self.ViewModel.Humanoid:FindFirstChildOfClass("Animator")
local AnimationTrack = animator:LoadAnimation(animation)
AnimationTrack.Looped = looped
AnimationTrack:Play(0)
AnimationTrack.Stopped:Wait()
end
Now, when I play an animation after playing a looping animation, the animation will play and then return to playing the looping animation. How would I prevent this?