(Node hill) Why does this zombie spawn script doesn't work

[its] JapaneseSushi
Joined 28/07/2019
Posts 225
06:27 PM 09/07/2020
Script:
//Normal zombies
let NormalZombie = new Bot("Normal Zombie")

let outfit = new Outfit(NormalZombie)
.body("#0d9436")
.torso("#694813")
.rightLeg("#694813")
.leftLeg("#694813")

async function spawner() {
while (true) {
Game.newBot(NormalZombie)
await sleep(15000)
}

spawner()

zombie.setInterval(() => {
let target = NormalZombie.findClosestPlayer(50)

if (!target) return
NormalZombie.moveTowardsPlayer(target, 10)
}, 10)

let touchEvent = NormalZombie.touching((p) => {
Game.messageAll([#ff0000]${p.username} was eaten by a zombie!)
p.kill()
})

//bot limits

if (world.bots.length > 10) {
Bot.destroy()
}


Lovestruck Luminati
Joined 15/12/2017
Posts 55,768
06:28 PM 09/07/2020
Contact SmartLion, he'll help you.


[cool] Maseybox16
Joined 19/06/2019
Posts 5,463
06:28 PM 09/07/2020
I don't know much about scripting maybe an error


[its] JapaneseSushi
Joined 28/07/2019
Posts 225
06:29 PM 09/07/2020
smart lion is afk


[feet] Edged
Joined 08/07/2020
Posts 579
03:10 PM 11/07/2020
Workshop built in scripts wont load.

And the script should always on Load.


[feet] Edged
Joined 08/07/2020
Posts 579
04:06 PM 11/07/2020
Quote from Edged , 03:10 PM 11/07/2020
Workshop built in scripts wont load.

And the script should always on Load.
I've made this, i think it will work.

https://gist.github.com/Core-commits/6730688c3ee4c1f7a0d3ce0e95368c94

1