when my character died, the animation provider has a issue
local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character.Humanoid:: Humanoid
local animator = humanoid.Animator:: Animaton
local Animation = {}
function Animation:playAnimation(animation: Animation, waitAnimationCompleted: boolean?)
if not character then return end
local animationTrack = animator:LoadAnimation(animation):: AnimationTrack
animationTrack.Priority = Enum.AnimationPriority.Action
animationTrack:Play()
if waitAnimationCompleted then
animationTrack.Stopped:Wait()
animationTrack:Stop()
end
return animationTrack
end
return Animation