Doesn't plays animation when died/reseted.
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(Plr)
Plr.CharacterAdded:Connect(function(char)
wait(2)
local Hum = char:WaitForChild("Humanoid")
Hum.BreakJointsOnDeath = false
Hum:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://4742312546"
local DeathAnim = Hum:LoadAnimation(anim)
Hum:GetPropertyChangedSignal("Health"):Connect(function()
if Hum.Health <= 0 then
DeathAnim:Play()
end
end)
DeathAnim.Stopped:Connect(function()
Hum.Health = 0
Hum:SetStateEnabled(Enum.HumanoidStateType.Dead, true)
end)
end)
end)
animation link : https://www.roblox.com/library/4742312546/Reset

1 comment
Are you trying to make like a Ragdoll Animation?