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

my respawn script only working SOMETIMES, and other times its just broken... why?

so my respawn script only works sometimes, and some times its completely broken. When it's broken, the "Human" (I changed the name to Human instead of Humanoid) make joints, the torso will float in air with head on top, and other parts just fall into nowhere... I only have: -Head, LArm,RArm,LLeg,RLeg,Torso -Humanoid -a respawn script and another script that doesn't affect the respawning of the NPC at all inside of the NPC

my respawn script:

npc = script.Parent:Clone()

function Died()
	wait(10)
	npc.Parent = script.Parent.Parent
	npc:MakeJoints()
	npc.Human.Health = npc.Human.MaxHealth
	script.Parent:Remove()
end

script.Parent.Human.Died:connect(Died)

1 comment

0

I wish I could help you, but sorry, I have no idea what is the issue with your script. Perhaps try to make the joints before you move it into the workspace?

1 answer

try remove the script.parent:remove() or make this spawn using teams

2 comments

0

script.Parent:Remove() is already in there

0

so remove it

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