I have a script that will play a animation whenever a person gets low health, but for some reason the animation won’t play.
Script:
local character = script.Parent
local humanoid = character:WaitForChild(“Humanoid”)
local animation = game.ReplicatedStorage:FindFirstChild(“Low Life Animation”)
local loadedAnimation = humanoid:LoadAnimation(animation)
humanoid.HealthChanged:Connect(function(health)
if health <= 40 then
loadedAnimation:Play()
else
loadedAnimation:Stop()
end
end)