I’m making a zombie game, i have a round system but keeps going even if the zombies from the last round is still there. I want to make sure that if nozombies == true then start next round. The nozombies variable will come from a for I loop, but I’m not sure how to check if all of the zombies are removed
You should store all the zombies in a folder and check if there are no children left on the folder
example:
-- all the zombies are stored in a folder called "Zombies"
local function GetZombies()
local zombieFolder = workspace.Zombies
local zombieAmount = #zombieFolder:GetChildren()
return zombieAmount
end
local zombiesLeft = GetZombies()
if zombiesLeft == 0 then
nozombies = true
-- go to next round
end