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

I need help with spawning a zombie during night?

Asked by 4 years ago

I tried making a zombie spawner for night time only and making sure its max 6 zombies however, It doesn't seem to work can anybody help me?

local NPC = game.ReplicatedStorage.Zombie
local spawner = game.Workspace.ZombieSpawns.XSp
local xox = game.ReplicatedStorage.Zombie.UpperTorso
local posXsp = game.Workspace.ZombieSpawns.XSp.Position
local lol = game.Workspace

while true do
    if game.Lighting.ClockTime >= 17 and game.Lighting.ClockTime <= 6 then
        local Colne = NPC:Clone()
        Colne.xox.CFrame = CFrame.new(posXsp) + Vector3.new(1,0,0)
        Colne.lol = posXsp
    end
end
0
Make sure you put a wait in your while true do loop. TheRobuxMaster5M -10 — 4y
0
Question, what's the error? VitroxVox 884 — 4y

Answer this question