This is my script: wait() local Humanoid = script.Parent.Humanoid Humanoid.BreakJointsOnDeath = false local DA = Instance.new("Animation") DA.AnimationId = "rbxassetid://6101308551" local DeathAnimation = Humanoid:LoadAnimation(DA)
Humanoid.HealthChanged:Connect(function(Health) if Health <= 0 then print("died") script.Parent.HumanoidRootPart.Anchored = true DeathAnimation:Play() wait(2) script.Parent:Destroy()
end
end)

1 comment
Where do I add that?