local lighting = game.Lighting
local spawnsfolder = script.Parent
local zombie = game.ReplicatedStorage.Zombie
lighting:GetPropertyChangedSignal("ClockTime"):Connect(function()
if lighting.ClockTime == 18 then
for i,spawns in pairs(game.Workspace.ZombieSpawnFolder:GetChildren()) do
if spawns:IsA("BasePart") and spawns.Name == "ZombieSpawn" then
local ZC = zombie:Clone()
ZC.Parent = game.Workspace.ZombieFolder
ZC.Name = "Zombie"
ZC.HumanoidRootPart.CFrame = CFrame.new(spawns.Position + Vector3.new(0,5,0))
end
end
end
if lighting.ClockTime == 6.4 then
for i,v in pairs(workspace.ZombieFolder:GetChildren()) do
v:Destroy()
print(i.." | gone")
end
end
end)
The zombie just doesn’t de-spawn.