Minor = script.Parent
Health = script.Parent
WalkSpeed = script.Parent
if Health <= 900 then
script.Parent.Minor.WalkSpeed = 39
end
i'm trying to make a script that makes it so when an NPC hits low health it goes fast but for some reason it doesn't work when i set it to the said value that is supposed to make it go fast when the health reaches that value also i named the Humanoid "Minor" so don't get confused on why it says minor = script.parent lol

3 comments
Id suggest using the HealthChanged humanoid event rather than the while loop https://developer.roblox.com/en-us/api-reference/event/Humanoid/HealthChanged
oki i used the varibles because i thought it would go for the stats of the humanoid
your script didn't work it's walkspeed stayed the same