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

Remove all zombies from the map after completing the wave?

What are the ways to remove all the zombies from the map after the wave ends, and sometimes I run out of zombies and some of them remain on the map. They are cloned to the game.Workspace

6 comments

0

Hi, please make sure to include the script you are having trouble with.

0

It's not about the script, but how to find all the humanoids with Zombie names in game. Workspace

0

Uh make a folder to store all of the zombies, so you can delete it later

0

Damn right, you can clone all the zombies into a separate zombie folder!!! Hi, that I did not guess, thank you, but for some reason I was looking for humanoids

0

Well, just all your zombies in a folder and then you can call :ClearAllChildren to clear everyone inside the folder.

0

Please could you edit this and add the script and I may be able to help!

1 answer

✓ Accepted answer

Using this is not recommended at all. As it can lag out your pc. I recommend doing something like what BestCreativeBoy commented. If you want, you could use this

for i,v in pairs(game.Workspace:GetChildren()) do
    if v.Name == "Drooling Zombie" then
        local humanoid = v:FindFirstChild("Humanoid")
        if humanoid then
            v:Remove()
        end
    end
end

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