for i,v in pairs(MobIndexer) do
local npc = v.MobModelLocate:FindFirstChild(tostring(v.Name))
print(tostring(npc.Name))
npc:FindFirstChild("Humanoid").Died:Connect(function()
task.wait(1)
local clonedmob = game.ReplicatedStorage.Mobs:FindFirstChild(npc.Name):Clone()
clonedmob.Parent = v.MobModelLocate
clonedmob:FindFirstChild("HumanoidRootPart").Position = npc:FindFirstChild("HumanoidRootPart").Position
local newmob = MobModule.Ui(v)
npc = v.MobModelLocate:FindFirstChild(tostring(v.Name))
wait(0.2)
npc:Destroy()
end)
local newmob = MobModule.Ui(v)
end
my npc only respawns once and then does not after? why? could anybody help with this