Hey! So, u probably already played a tower defense game and you know that it is based on waves with a set amount of zombies, but im not finding a way to make that system
Can anyone help me do it?
The script that is supposed to spawn things
local smodule = require(game.ReplicatedStorage.Modules.Scripting.Spawner)
local edata = require(game.ReplicatedStorage.Modules.Data.EnemyData)
local wdata = require(game.ReplicatedStorage.Modules.Data.WaveData)
local waves = wdata:GetChildren()
function spawnmob(tospawn)
smodule.spawnmob(tospawn)
end
for i = 1, #waves do
spawnmob(table.concat(wdata)) -- i think this like is the error
task.wait(2)
end
Module script if anyone needs
local waves = {
["1"] = {
"Normal",
"Normal",
"Normal",
"Normal"
},
["2"] = {
"Normal",
"Normal",
"Normal",
"Normal",
"Normal",
"Normal",
"Normal"
},
["3"] = {
"Speedie",
"Speedie",
"Speedie",
"Speedie",
"Speedie",
}
}
return waves
about the error line i dont know how to use table.concat for it, im not really experienced with it