I've been following this tutorial here:https://www.youtube.com/watch?v=dKytA5tz-0Q, I tried to edit it so that animations would change if the health was at a specific value or less but it won't work, even the original script that was used in the video wouldn't work.
Here's the code, by the way this was put into a script and thrown into ServerScriptService with FE disabled, like the video showed.
game.Players.PlayerAdded:Connect(function(plr)
local char = plr.CharacterAdded:Wait()
while true do
if char.Humanoid.Health >= 70 then
print("health at 100")
char.Animate.Idle.Animation2.AnimationId = "rbxassetid://5980688357" --these animation id's are test animations, they aren't supposed to be actual animations.
elseif char.Humanoid.Health <= 50 then
print("health at 50")
char.Animate.Idle.Animation2.AnimationId = "rbxassetid://5980695371"
end
wait()
end
end)
If anyone could help, that would be very appreciated

2 comments
I suggest using the :GetPropertyChangedSignal() https://developer.roblox.com/en-us/api-reference/function/Instance/GetPropertyChangedSignal
I've edited it to this: https://pastebin.com/AC6FTJX4 would this work?