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 5 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?

01local NPC = game.ReplicatedStorage.Zombie
02local spawner = game.Workspace.ZombieSpawns.XSp
03local xox = game.ReplicatedStorage.Zombie.UpperTorso
04local posXsp = game.Workspace.ZombieSpawns.XSp.Position
05local lol = game.Workspace
06 
07while true do
08    if game.Lighting.ClockTime >= 17 and game.Lighting.ClockTime <= 6 then
09        local Colne = NPC:Clone()
10        Colne.xox.CFrame = CFrame.new(posXsp) + Vector3.new(1,0,0)
11        Colne.lol = posXsp
12    end
13end
0
Make sure you put a wait in your while true do loop. TheRobuxMaster5M -10 — 5y
0
Question, what's the error? VitroxVox 884 — 5y

Answer this question