ohhhh where is your animation located in the explorer? ReplciatedStorage? ServerStorage? workspace? you should put the directory of where your animation is located inside the
local LoadedAnimation = Humanoid:LoadAnimation(**Here**)
a directory like game.ReplciatedStorage.AnimationName
There should be an animation instance though? When you create an animation it should make an animation instance. Correct me if I’m wrong. I don’t animate lol
So when you create animation and you need press Export and wait 3-4 sec then you see code animation and you copy this code and put in script or in animation Key
local Character = script.Parent
local Humanoid = Character:WaitForChild(“Humanoid”)
local AnimationObject = PATH_TO_ANIMATION
local LoadedAnimation = Humanoid:LoadAnimation(AnimationObject)
local oldHealth = Humanoid.Health
Humanoid:GetPropertyChangedSignal("Health"):Connect(function()
if oldHealth > Humanoid.Health then
print(“Humanoid took " … oldHealth - Humanoid.Health … " damage”)
LoadedAnimation:Play()
end
just so you know that there is nothing called Humanoid.HealthChanged