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.

2 comments

0

great all you need to do is load the animation into the humanoid and bam, you did it

0

but it does not work