I created a Humanoid Noob by the name of "Noob" and when it is killed my Script I attempted to create will not respawn it.
Here is the Script that I attempted to create but it does not work.
local copy = Noob:clone(1)
wait (15)
Noob.Humanoid.Died:connect(function () copy.Parent = game.Workspace end
local NPC = script.Parent -- You are missing this. The game needs to know where "Noob" is. local NPC2 = NPC:Clone() -- Cloning the NPC. NPC.Humanoid.Died:connect(function() -- Created the function that we will use to get information when dead. NPC2.Parent = game.Workspace -- Changing the NPC clone's parent from **nil** to **workspace**. wait(0.5) NPC:remove() -- Removing the remains of the dead NPC. end) -- And ending it off with an end for our function above.
A Humanoid.Died function can tell if the player has died or not, by doing this you can do many things like kicking them from the game, respawning, giving an award, taking away leaderstats, and much more...
I see in yours that you tried the same function..
One more thing, there's an output in studio, it helps debug scripts. To access it, simply go to the view tab and click on output.
Change the script how you like it, and remember, enjoy!
I hope you learned something.