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

Why are 2 functions not working? Also there's no error at the log

local function zombieSpawn(name)
	local clone = game.ReplicatedStorage.Zombies:FindFirstChild(name):Clone()
	clone.Parent = game.Workspace.Zombies
	clone.HumanoidRootPart.CFrame = CFrame.new(game.Workspace.RandomSpawns:GetChildren()[math.random(1,#game.Workspace.RandomSpawns:GetChildren())].Position)
end
local function forizombie(Times,zombie,cooldown)
	for i=1,Times do
		zombieSpawn(zombie)
		wait(cooldown)
	end
end
local function countdown(theseconds,timed)
	spawn(function()
		for i=timed,0,-1 do
			if #game.Workspace.Zombies:GetChildren() == 0 then
				break
			end
			theseconds = i
			wait(1)
		end
	end)		
	
end
forizombie(1,"Zombie",2)
local seconds = 90
coundown(seconds,90)

4 comments

0

"not working", you need to be more specific than that to receive help.

0

Try using print("Test") to narrow in the problem

0

Which 2 functions

0

Uhmm in line 26 you misspelled "countdown"

1 answer

TRY THIS METHOD FIRST BEFORE TRYING OTHERS: Maybe try using function but not do local function that maybe the issue. IF THAT FIX DIDN'T WORK TRY THESE: The other possible issue on line 13 you do spawn (function() try doing function(spawn) or function() spawn or spawn:Connect(function()

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