KashTheKingYT

LowHealth Animation

Jun 12th, 2021
24,839
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.37 KB | None | 0 0
  1. --Place in StarterCharacterScripts
  2. local character = script.Parent
  3. local humanoid = character:FindFirstChild("Humanoid")
  4. local animation = game.ReplicatedStorage:FindFirstChild("LowHealthAnim")
  5. local loadedAnimation = humanoid:LoadAnimation(animation)
  6.  
  7. while wait() do
  8.     if humanoid.Health <= 40 then
  9.         loadedAnimation:Play()
  10.     else
  11.         loadedAnimation:Stop()
  12.     end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment