Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Remove all zombies from the map after completing the wave?

Asked by 4 years ago

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

0
Hi, please make sure to include the script you are having trouble with. matiss112233 258 — 4y
0
It's not about the script, but how to find all the humanoids with Zombie names in game. Workspace rikisamejima 2 — 4y
0
Uh make a folder to store all of the zombies, so you can delete it later Block_manvn 395 — 4y
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 rikisamejima 2 — 4y
View all comments (2 more)
0
Well, just all your zombies in a folder and then you can call :ClearAllChildren to clear everyone inside the folder. BestCreativeBoy 1395 — 4y
0
Please could you edit this and add the script and I may be able to help! TgaTheGoldenArmour 15 — 4y

1 answer

Log in to vote
0
Answered by
Techyfied 114
4 years ago

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
Ad

Answer this question