0

# How do i make the NPC go faster on low health?

if script.Parent.Minor.Health <= 900 then
script.Parent.Minor.WalkSpeed = 39
end


i used this script someone on this website gave me and IT DOESN'T WORK i need help (the humanoid in the npc is named Minor btw)

0
What's the full code, what type of script is it, and what is it under? sheepposu 561 — 3d

2

(Put script inside npc) Assuming your npc has an humanoid inside, you could just do

local hum = script.Parent:WaitForChild("Humanoid")

hum.HealthChanged:Connect(function()
if hum.Health <= 900 then
hum.WalkSpeed = 39
end
end)

0
You are correct Xapelize 1835 — 3d
0
Edited 3 days ago

~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



GetChildren ("Mob") if Health >50 add speed = +5 if Health >30 add speed = +10 if Health >10 add speed = +20 end) end)~~~~~~~~~~~~~~~~~

0
uhh you should put your code in the code block (the ~~) so it's easier to read i'm having a stroke dylancrazy88 20 — 3d
0
anyway your script doesn't work and it's hard to read by the way you wrote it dylancrazy88 20 — 3d