Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Having troubles with humanoid's being invincible. Any help?

Asked by 11 years ago

I am creating a NPC I'm having the problem that it's currently invincible. I ripped my coding out from another NPC and replaced some things (I hardly have any idea what I'm doing) and didn't seem to get it to work.

The Humanoid is named NPC.

01function waitForChild(parent, childName)
02    while true do
03        local child = parent:findFirstChild(childName)
04        if child then
05            return child
06        end
07        parent.ChildAdded:wait()
08    end
09end
10 
11-- declarations
12 
13local Figure = script.Parent
14local Head = waitForChild(Figure, "Head")
15local Humanoid = waitForChild(Figure, "NPC")
View all 29 lines...

Help would be greatly appreciated! :)

0
You have to change the weapons. NotsoPenguin 705 — 11y

1 answer

Log in to vote
1
Answered by
AxeOfMen 434 Moderation Voter
11 years ago

This script is a health regen script. If you want the NPC to not regen health, delete this script and it won't regen anymore. If it's regenerating too fast for your taste, change 0.08 to something smaller.

Ad

Answer this question