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

Can someone help me make the script?

Asked by
red106 0
10 years ago

I was trying to make a script that would respawn a Npc anytime you kill it but for some reason when I put the wait over 1 second the script doesn't work. So I was wondering if someone could make a respawning script for me?

1 answer

Log in to vote
0
Answered by 10 years ago

Put this script in the NPC This should work:

name="Human"

robo=script.Parent:clone()

while true do
    wait(10)
    if script.Parent.Human.Health<1 then
        robot=robo:Clone()
        robot.Parent=script.Parent.Parent
        robot:MakeJoints()
        script.Parent:Remove()
    end
end

CHANGE/RENAME THE NPC'S HUMANOID TO HUMAN!

0
I have nothing else if this doesn't work. Operation_Meme 890 — 10y
0
If it's a Model do I put the model name? red106 0 — 10y
0
Well, no, it already goes TO the model when you run it. see the Parent at robo? Operation_Meme 890 — 10y
Ad

Answer this question