Hi, I am making a zombie survival game but I need a zombie spawner brick. I need it so after some time (lets say wait (5) ) It will spawn another model of a zombie (got zombie model). I have tried many times but can't figure it out please help!
In sight it should just: wait (5) spawn"zombie" in workspace repeat.
1 | while true do |
2 | function SpawnZombie() |
3 | local g = game.ServerStorage.Zombie:Clone() |
4 | g.Parent = game.Workspace |
5 | g.Humanoid:MoveTo(game.Workspace.ZombieSpawner.Positon) --Also assuming that the Humanoid is called Humanoid. |
6 | end |
7 | wait( 5 ) |
8 | SpawnZombie() |
9 | end |