Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make a injured script that changes animation on certain health?

Asked by 5 years ago

I couldn't think of a good question title.I want to make a script in which when the players takes a certain amount of damage he is slower and given different animations. I have no idea on how to do something like this, but here is my attempt nevertheless...

local Player = game.Players.LocalPlayer
local Character = workspace:WaitForChild(Player.Name)
local Humanoid = Character:WaitForChild('Humanoid')

if Humanoid.Health <=25 then
    Humanoid.WalkSpeed = 8
    Character.Animate.walk.WalkAnim.AnimationID = "rbxassetid://"
end

A simple explanation will work for me or if you are willing to send me a link to the right direction that'll be fine.

0
great all you need to do is load the animation into the humanoid and bam, you did it greatneil80 2647 — 5y
0
but it does not work theGoodpancake 5 — 5y

Answer this question