When I try to use a script to make endless waves of zombies, they spawn once

So, I used this script to make the zombies spawn.


Then this happens:
https://streamable.com/ifpqa9

Hi, it’s a problem with your gun script not doing any damage. To me, the respawn script looks fine. But to test, do:

workspace.Zombie.Humanoid:TakeDamage(workspace.Zombie.Humanoid.MaxHealth)

in the command bar.

Nope. While wait(1) will run infinitely. Try it yourself in studio’s command bar.

What are you talking about? Both of them will work regardless, as they’re infinite loops unless told to break

while wait() do
    print("LOOP.MP3")
end
while true do
    wait()
    print("LOOP.MP3")
end

Also the only possible error that I could really see are these lines here:

Maybe inside your for loop? Try implementing print statements

He did. He printed “Looping…”

I meant inside the conditional check, but ok

When I tried to do while wait(1) do before it didn’t work. I don’t know why this time worked. Sorry for mistake.

Weird. Did you put an end after the do? Maybe that’s why it doesn’t work

Of course but never mind. I may have used deprecated methods.

You typed
SpawnPoint*CFrame.new()
instead of
SpawnPoint.CFrame*CFrame.new()
You’re not giving it a CFrame, you’re giving it a Part.

1 Like

Oh cool it works now. Thank you.

1 Like