The script doesn’t have to. It’ll just play the animation when the player’s health is low. Why?
Because i want the player to play A hurt walking animation when he is walking and an idle one when he is standing
Oh, I’ll get that sorted then in this script:
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Humanoid = Character:WaitForChild('Humanoid')
local sound = script.HurtSound
local animwait = script.HurtAnimation
local idlewait = script.IdleAnimation
Character.Running:Connect(function(speed)
if speed > 0 then
if Humanoid.Health <=25 then
sound:Play()
local anim = Humanoid:LoadAnimation(animwait)
anim:Play()
elseif Humanoid.Health >25 then
anim:Stop()
sound:Stop()
else
anim:Stop()
local idle = Humanoid:LoadAnimation(idlewait)
end
end
end
end)
Ok i’ll try it out and see if it works
Shoudln’t we play the idle anim after we load it?
Oh I forgot to do that. You can add that in.
Should the walking anim priority be action or mouvement? And the idle one too?
It should be movement. Action is for something like a fighting animation.
Both of them should be mouvement?
The idle animation should be the animation priority Idle.
It keeps saying this error : HurtAnimation is not a valid member of LocalScript “Workspace.furiousjumperFuNy.LocalScript”
Even tho my anim is in it and has the same name
Send me a picture of the name please.
Can you tell me how to post an image rlly quik?
Oh, go to your keyboard and hit the windows button, shift and s at the same time.
i’m on mac soo…
You can select any position of the image. Like this:
After that, just hit CTRL and v when your commenting on the dev forum.
As i said before i’m on mac …
did it work? if not idk what to do
We cant see it because its not an image link, it’s a route to the file in your computer.
oh ok so i rlly don’t know how to post an image as i’ve never posted one before