Hello devforum, I need some help with this script.
The animation works well, but when it tries to play the animation again after the player has died it shows this:
This is the script:
local animation
animOnEvent.OnServerEvent:Connect(function(plr, anim, hum)
if hum ~= nil then
animation = hum:LoadAnimation(anim)
animation:Play()
end
end)
animOffEvent.OnServerEvent:Connect(function(plr, anim, hum)
if animation ~= nil then
animation:Stop()
end
end)