I noticed some stuff I did wrong in my previous post. Maybe this will work:
game.Workspace.NPC.Humanoid:GetPropertyChangedSignal("Health"):Connect(function()
game.Workspace.NPC.WalkSpeed = 100 - game.Workspace.NPC.Humanoid.Health + 16
end)
if game.Workspace.NPC.Humanoid.Health == 100 then
game.Workspace.NPC.Humanoid.WalkSpeed = 16
end
--Change NPC to the name of the NPC. |