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

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

Asked by 1 year ago
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)
0
"not working", you need to be more specific than that to receive help. Shawnyg 4330 — 1y
0
Try using print("Test") to narrow in the problem theking66hayday 841 — 1y
0
Which 2 functions 666_brithday 103 — 1y
0
Uhmm in line 26 you misspelled "countdown" T3_MasterGamer 2189 — 1y

1 answer

Log in to vote
0
Answered by 1 year ago
Edited 1 year ago

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()

Ad

Answer this question