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

[NOT SOLVED] Why doesn't this work?

Asked by 9 years ago

Everything seems to work, apart from the zombie cloning for Lighting then putting it into the 'Zombies' group in workspace. No errors come up on the console either. Any help would be appreciated.

Lighting = game:service("Lighting")

function waittime()
    wait(10)
end

Lighting.TimeOfDay = "06:00:00"


while true do
    wait()
    waittime()

    zombieswork = game.Workspace.Zombies:GetChildren()

for i = 1, #zombieswork do
    zombieswork[i]:remove()

    waittime()

for i = 10, 1, -1  do

    zombieslight = game.Lighting.Zombies:GetChildren()
    zombieslight:clone()
    zombieslight.parent = game.Workspace.Zombies
    print('Zombie spawned')

end
end
end
0
So what exactly are you trying to do? Are you trying to delete one zombie, then add a whole bunch? What exactly do you want to happen? Perci1 4988 — 9y
0
I'm trying to add zombies into the game from Lighting every 10 seconds, using the for loop, but no zombies spawn in. Moderance 30 — 9y

1 answer

Log in to vote
-2
Answered by
xuefei123 214 Moderation Voter
9 years ago

Try a while true do loop

while true do
--clone script
wait(10)
end
0
Did not work. Moderance 30 — 9y
0
should work now xuefei123 214 — 9y
Ad

Answer this question