(roblox studio)how to make a script that respawns mobs if they died
Channel:
Subscribers:
315
Published on ● Video Link: https://www.youtube.com/watch?v=vvWgNsRdLeg
discord https://discord.gg/nzbjtR42VK
script-
local Copy = script.Parent:Clone()
local NPC = script.Parent
local Humanoid
for i,v in pairs(NPC:GetChildren()) do
if v:IsA('Humanoid') then
Humanoid = v
end
end
if Humanoid then
Humanoid.Died:Connect(function()
wait(5)
Copy.Parent = NPC.Parent
Copy:MakeJoints()
NPC:Destroy()
end)
else
warn('Cannot find Humanoid in Respawn Script!')
end
Other Videos By anonymouswatcher
Tags:
Clipchamp
Online video editor
Other Statistics
Roblox Statistics For anonymouswatcher
anonymouswatcher currently has 7,044 views spread across 176 videos for Roblox. His channel published over 2 days worth of content for the game, or 78.51% of the total watchable video for Roblox on anonymouswatcher's YouTube channel.