Advertisement
1MinuteRoblox

Npc Respawn Script by 1MinuteRobloxTutorials

May 27th, 2024
1,409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. --Respawn Script by 1MinuteRobloxTutorials--
  2.  
  3. local Copy = script.Parent:Clone()
  4. local NPC = script.Parent
  5. local Humanoid
  6. for i, v in pairs(NPC:GetChildren()) do
  7. if v:IsA("Humanoid") then
  8. Humanoid = v
  9. end
  10. end
  11.  
  12. if Humanoid then
  13. Humanoid.Died:Connect(function()
  14. wait(1)
  15. Copy.Parent = NPC.Parent
  16. Copy:MakeJoints()
  17. NPC:Destroy()
  18. end)
  19. else
  20. warn("Cannot find Humanoid in Respawn Script")
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement