# Constant Zombie Spawn Stacking

I’m trying to write a script where a zombie will spawn at a random chosen point every 5 seconds.
The only problem with it is that it tends to spawn zombies on top of another zombie every so often.
How can I make it so the zombie won’t be spawned at a point with a zombie already there?

``````

local zombieTimer = 0

function SpawnZombie()
if(SERVER) then
if((zombieTimer) < CurTime()) then
zombieTimer = CurTime() + 5
local zombieSpawnPoint = {}
zombieSpawnPoint[1] = Vector(-207.981827, 3884.153320, 166.602859)
zombieSpawnPoint[2] = Vector(935.685730, 3856.399170, 132.301178)
zombieSpawnPoint[3] = Vector(192.276840, -460.654510, 103.815506)
zombieSpawnPoint[4] = Vector(819.535461, -126.727180, 97.656319)
zombieSpawnPoint[5] = Vector(-750.774719, 1181.735474, 92.914185)
zombieSpawnPoint[6] = Vector(-1343.234985, 2533.335938, 100.804321)
zombieSpawnPoint[7] = Vector(1923.438721, 5052.336426, 126.810349)
zombieSpawnPoint[8] = Vector(2086.481934, 1769.028809, 101.142883)
zombieSpawnPoint[9] = Vector(-213.509171, 164.306107, 93.954643)
zombieSpawnPoint[10] = Vector(898.648193, 1523.052124, 93.932045)
zombieSpawnPoint[11] = Vector(1106.038452, 1824.514893, 96.407631)
zombieSpawnPoint[12] = Vector(496.673615, 344.343445, 131.245316)

local newZombie = ents.Create("npc_zombie")
newZombie:SetPos(zombieSpawnPoint[math.random(1,12)])
newZombie:Spawn()
end
end
end