Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can someone help me make the script?

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

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!

3 comments

0

I have nothing else if this doesn't work.

0

If it's a Model do I put the model name?

0

Well, no, it already goes TO the model when you run it. see the Parent at robo?

This discussion is preserved as it was. New answers, comments, and votes are closed.