I’m coding a wave-system following GnomeCode’s TD tutorial, and I keep getting this error, I’ve troubleshooted about 6 times already and it’s the same result.
Code:
local mob = require(script.Mob)
local map = workspace.Test
for wave=1, 10 do
print("WAVE STARTING:" , wave)
if wave <= 1 then
elseif wave <= 1 then
for i=1, 5 do
mob.Spawn("Basic Dummy" , 3 * wave, map)
end
end
if wave <= 4 then
elseif wave <= 5 then
for i=5, 8 do
mob.Spawn("Fast Dummy", 3 * wave, map)
end
if wave <= 7 then
elseif wave <= 8 then
for i=8, 10 do
mob.Spawn("Tank Dummy", 4 * wave, map)
end
if wave <= 9 then
elseif wave == 10 then
for i=10, 10 do
mob.Spawn("Basic Boss", 1 * wave, map)
end
end
repeat
task.wait(01)
until #workspace.Mobs:GetChildren() == 0
print("WAVE ENDED")
task.wait(1)
end
local mob = require(script.Mob)
local map = workspace.Test
for wave=1, 10 do
print("WAVE STARTING:" , wave)
if wave <= 1 then
elseif wave <= 1 then
for i=1, 5 do
mob.Spawn("Basic Dummy" , 3 * wave, map)
end
end
if wave <= 4 then
elseif wave <= 5 then
for i=5, 8 do
mob.Spawn("Fast Dummy", 3 * wave, map)
end
if wave <= 7 then
elseif wave <= 8 then
for i=8, 10 do
mob.Spawn("Tank Dummy", 4 * wave, map)
end
end
if wave <= 9 then
elseif wave == 10 then
for i=10, 10 do
mob.Spawn("Basic Boss", 1 * wave, map)
end
end
repeat
task.wait(01)
until #workspace.Mobs:GetChildren() == 0
print("WAVE ENDED")
task.wait(1)
end
local mob = require(script.Mob)
local map = workspace.Test
for wave=1, 10 do
print("WAVE STARTING:" , wave)
if wave <= 1 then
elseif wave <= 1 then
for i=1, 5 do
mob.Spawn("Basic Dummy" , 3 * wave, map)
end
end
end
if wave <= 4 then
elseif wave <= 5 then
for i=5, 8 do
mob.Spawn("Fast Dummy", 3 * wave, map)
end
if wave <= 7 then
elseif wave <= 8 then
for i=8, 10 do
mob.Spawn("Tank Dummy", 4 * wave, map)
end
end
if wave <= 9 then
elseif wave == 10 then
for i=10, 10 do
mob.Spawn("Basic Boss", 1 * wave, map)
end
end
repeat
task.wait(01)
until #workspace.Mobs:GetChildren() == 0
print("WAVE ENDED")
task.wait(1)
end
local mob = require(script.Mob)
local map = workspace.Test
for wave=1, 10 do
print("WAVE STARTING:" , wave)
if wave <= 1 then
elseif wave <= 1 then
for i=1, 5 do
mob.Spawn("Basic Dummy" , 3 * wave, map)
end
end
if wave <= 4 then
elseif wave <= 5 then
for i=5, 8 do
mob.Spawn("Fast Dummy", 3 * wave, map)
end
if wave <= 7 then
elseif wave <= 8 then
for i=8, 10 do
mob.Spawn("Tank Dummy", 4 * wave, map)
end
end
if wave <= 9 then
elseif wave == 10 then
for i=10, 10 do
mob.Spawn("Basic Boss", 1 * wave, map)
end
end
repeat
task.wait(01)
until #workspace.Mobs:GetChildren() == 0
print("WAVE ENDED")
task.wait(1)
end
end