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

How do I revive/respawn dummies after they die?

I need to respawn/revive a dummy but don't know-how. Could someone push me in the right direction?

repeat
	if game.Workspace.Dummy1.Humanoid.Health < 100 then
		game.Workspace.Dummy1.Humanoid.Health += 100
	end	
	wait(0.15)
until true == false

3 comments

0

Create a copy of dummy right after it spawns like Dummy:Clone() and after it dies (use Humanoid.Died event instead of loop pls), you remove old dummy and clone the copy and parent it to old dummy's parent. simple

0

I was thinking of this and didn't know how to execute it so thanks!

0

What you said to do didn't work imKirda I need you to evaluate more on what to do please

1 answer

clone it before it dies, or when it respawns/spawns.

clone = script.Parent:Clone()

then when it dies respawn it and wait for a period of time and eventually delete the dead one if you want.

script.Parent.Humanoid.Died:Connect(function()

	wait(10)
	clone.Parent = workspace

	wait(20)
	script.Parent:Destroy()

end)

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