So, in my game I have a wave system and a counter but I want it so it restarts when I kill all the zombies it resets so I tried to do this but the text kept overlapping why?
local spawner = require(game.ServerScriptService.Spawner)
local label = script.Parent
local title = script.Parent.Parent.Title
local AnimalAmount = game.ReplicatedStorage.Valuelocal function countDown(labelName, timeMax, waveNum)
for i = timeMax, 0, -1 do
label.Text = labelName … i
wait(1)
end
if waveNum > 0 then
spawner:spawnAnimals(waveNum, 60)
end
endlocal function go()
for i = 1, 3, 1 do
title.Text = " intermission "
countDown("", 15, 0)
title.Text = " starting in "
countDown("", 5, i)
title.Text = " fighting "
countDown("", 60, 0)
end
endAnimalAmount.Changed:Connect(function()
if AnimalAmount.Value == 0 thengo()
end
end)wait(2)
go()