Wave Based Attacks - Tower Defense Tutorial #2

Поділитися
Вставка
  • Опубліковано 19 чер 2024
  • We continue our Tower Defense series by taking our single zombie and incorporating him into a wave based fighting machine!
    DISCORD ► / discord
    TWITTER ►@gnomecodeRBLX
    TIMESTAMPS►
    0:00 Intro
    0:36 Creating module scripts
    2:58 Creating simple map
    4:37 Spawning Mobs
    8:34 Moving Spawned Mobs
    9:53 Spawning a Wave
    10:30 Moving in unison
    16:45 Zombie Factory
    17:18 Delaying each wave
    19:30 Outro

КОМЕНТАРІ • 6 тис.

  • @UltimanteTheCool
    @UltimanteTheCool 2 роки тому +482

    I like how he doesnt just create tutorials and tell you how to do things... he teaches you as well and shows you common mistakes people do. thats awesome

  • @ThehomelessZar
    @ThehomelessZar 2 роки тому +17

    Omg this has been such an adventure I'm starting to get the hang of scripting in Roblox studio, but you have been there for me forever almost I've been watching videos like these forever thank you so much for helping everybody with these videos!

  • @Rez_R
    @Rez_R 8 місяців тому +5

    I like these kinds of videos cause i can see the progress from a simple baseplate to a functioning game, im not even a developer

  • @arkin2263
    @arkin2263 8 місяців тому +78

    To everyone who's mobs arent spawning:
    1. Check if you have a map folder. In this video, the folder name is "Grassland" and there should be 3 main things inside: "Path" folder, "Waypoints" folder, and "start" object.
    2. Check if you have "start" in your "Grassland" or map folder. The "start" object can be anything.
    3. Check if you put the "zombie" or enemy inside a "Mobs" folder in the ServerStorage.

    • @asadfehduhgrfhu
      @asadfehduhgrfhu 8 місяців тому +22

      Everything I did Correctly but It don't spawn In.

    • @Baguga.
      @Baguga. 8 місяців тому +11

      i got everything right its still wouldnt spawn the zombies

    • @asadfehduhgrfhu
      @asadfehduhgrfhu 8 місяців тому

      Bro, I found out why, If you have the Zombie called Drooling Zombie, Just Rename it to "Zombie" With a Caps Z@@Baguga.

    • @arkin2263
      @arkin2263 7 місяців тому +1

      man i have no idea then mine works just fine

    • @coltiny1265
      @coltiny1265 7 місяців тому +2

      @@arkin2263 how?

  • @Giltom09
    @Giltom09 10 місяців тому +5

    U need more subs man, this stuff is so helpful

  • @ArseneKichi
    @ArseneKichi 2 роки тому +8

    started to play alot of td games so thanks to your td tutorial series I might be able to make my own! :D

  • @Gnarpyewe
    @Gnarpyewe 23 дні тому

    I love how its really basic and easy to learn, i love it

  • @CymmicalRobloxW
    @CymmicalRobloxW 8 місяців тому +1

    Thank you so much GnomeCode, you have one of the best tutorials to make TD games. This all worked all because of you Thank you so much!!

    • @Kimkom123
      @Kimkom123 14 днів тому +1

      So can u pls type the mob script in here just for me is it not working and im trying like 3 hours 😅it would be great when u do this

    • @jasontek6638
      @jasontek6638 12 днів тому

      So apparently this does not work in newer versions based on the experience the newer people are having

    • @imyofarder
      @imyofarder День тому

      @@jasontek6638 this tut is not MEANT for newer people. you need to not be new to learn this. you have yo at least know the basics

  • @SRTdowned
    @SRTdowned 2 роки тому +8

    You are a really good coder keep up the good work!

    • @ag.hoopin
      @ag.hoopin 7 місяців тому

      How do I fix this "ServerScriptService.main.mob:9: attempt to index nil with 'CFrame'

  • @totallynotxwblizzard2605
    @totallynotxwblizzard2605 2 роки тому +35

    I love these tutorials! Please continue uploading videos like these.

    • @baymaxbizarreadventure5652
      @baymaxbizarreadventure5652 2 роки тому

      nice profile picture

    • @HeyitsXR2LIVE
      @HeyitsXR2LIVE 2 роки тому +1

      the thing i hate about them is he dosen't explain errors. I did everything and it wont work i even copied the code didnt work

    • @Bro-vs5mk
      @Bro-vs5mk 2 роки тому

      @@HeyitsXR2LIVE the only problem i have it that it moves to fast

    • @ShadowDragon-hb3yv
      @ShadowDragon-hb3yv 2 роки тому

      @@Bro-vs5mk i find it helpful every time he writes a new line to pause and write, it does take awhile but it works

    • @Bro-vs5mk
      @Bro-vs5mk 2 роки тому

      @@ShadowDragon-hb3yv yeah

  • @NinjafoxYT791
    @NinjafoxYT791 4 місяці тому

    This series deserves a sub :)

  • @Aqua846_
    @Aqua846_ 8 місяців тому

    genuinly this is the best tuturial ever

  • @cornerwedge2876
    @cornerwedge2876 2 роки тому +18

    really helpful, this entire tutorial so far has been going great and it looks very promising, and everything works really well. Thanks!

  • @epicgamer11717
    @epicgamer11717 9 місяців тому +11

    ive noticed i actually started to understand how to code, this series made me wanna start making games and i when i tried i just copied the code he gave me and had no idea what to do, these days i actually understand what they do which is making me proud

    • @MMGProductionss
      @MMGProductionss 9 місяців тому

      How do I fix a script timeout

    • @Neshy_YT
      @Neshy_YT 6 місяців тому

    • @imyofarder
      @imyofarder 3 місяці тому

      @@Neshy_YT

    • @afterpartyslays
      @afterpartyslays 3 місяці тому +1

      @@MMGProductionss
      if your doing it in "while true do" (havent watched the vid) you can put wait() at the end and it should fix it

  • @GodOfSpeedruns740
    @GodOfSpeedruns740 5 місяців тому +1

    Great Series! (Subscribed after first video!)

    • @SkibidiUniverse24
      @SkibidiUniverse24 4 місяці тому

      do u know how to fix this? HumanoidRootPart is not a valid member of Model "Enemy"

    • @randomcat1224
      @randomcat1224 4 місяці тому

      ​@@SkibidiUniverse24 first off, you have to go get some better common sense
      secondly, learn how to rig models
      third, its fixed
      nothing else

  • @Yugoslavian_Animator
    @Yugoslavian_Animator 5 місяців тому +1

    Best tutorial i ever seemed

  • @issacjoestar8046
    @issacjoestar8046 2 роки тому +21

    I and others appreciate you taking your time to do all of this GnomeCode, you're a godsend man.

    • @boogernnboogie6838
      @boogernnboogie6838 2 роки тому +2

      the script doesnt work

    • @SRTdowned
      @SRTdowned 2 роки тому

      @@boogernnboogie6838 Yes it does check the output of there are any errors

    • @Joyjohn1012
      @Joyjohn1012 Рік тому

      @@huller1041 same, for me it just warns me that the mob doesn’t exist even though i have his exact code

    • @Joyjohn1012
      @Joyjohn1012 Рік тому

      @@huller1041 i’ve tried 4 times though and no fix

    • @Joyjohn1012
      @Joyjohn1012 Рік тому

      @@huller1041 Ok ty bro

  • @planetgaming5979
    @planetgaming5979 Рік тому +7

    really high quality tutorial and i learnt a lot. Also his basic tutorial is really in depth

  • @Peaceful_Bacon
    @Peaceful_Bacon 5 місяців тому

    Thanks so much! it helped alot

  • @PedroTDS
    @PedroTDS 2 місяці тому

    tysm bro after i do this game i will wach other tutorials!!

  • @chricyan778
    @chricyan778 2 роки тому +36

    Woah, this is nice; i'm new to scripting and i always wanted to make a td game for like 7 months but never actually finished / released any of them, i tried 2 times and discontinued the first one because i was stuck on the wave system, thanks a lot for this video

    • @noeshaj
      @noeshaj 2 роки тому +2

      bro same:D im glad gnome did this series

    • @SomeGameDeveloper
      @SomeGameDeveloper Рік тому +1

      yeah same im working on one rn

    • @DarwisyAdyan
      @DarwisyAdyan Рік тому

      @@SomeGameDeveloper whats the name? ill play it

    • @deisydejesus2033
      @deisydejesus2033 8 місяців тому

      Im also new to scripting. I am learning.

  • @MwSama
    @MwSama 2 роки тому +14

    I love how u cleanly coded everything! Just perfection!

  • @Timraz1
    @Timraz1 8 днів тому

    the best teacher in whole world, i love your videos. You making amazing job

  • @Theblademaster5029
    @Theblademaster5029 7 місяців тому

    Man, this guy is very good tutorial maker😇

  • @sul4110
    @sul4110 2 роки тому +37

    This series is really great! Unlike other tutorials, when I run into issues, I can fix them easily! Not only that, your explanations and scripts are really simple and easy to understand.

    • @verybasicchannel
      @verybasicchannel 2 роки тому

      In 13:21, its instead of identifying the humanoid, it identifies something named humanoid(which doesnt exist) in humanoid. Help?

    • @10szym44
      @10szym44 2 роки тому

      ​@@verybasicchannel did you do mob:WaitForChild("humanoid") or did you do mob:WaitForChild("Humanoid")

    • @donaterplays5276
      @donaterplays5276 2 роки тому

      @@10szym44 what of this variants is good?

    • @donaterplays5276
      @donaterplays5276 2 роки тому

      Bros, please someone help, without help, I can not continue to do this project..., My zombie DOES NOT MOVEMENT!, he spawns alone, and is completely inactive. Also, tell me how to call the table at the bottom of the screen, which shows your last actions ?
      Please kind people, help to deal with the problem, otherwise the game will not live, all hope is on you.

    • @coolestHurensohn195
      @coolestHurensohn195 2 роки тому

      @@donaterplays5276 its mob:WaitForChild("Humanoid")

  • @immuno9015
    @immuno9015 Рік тому +4

    10:06 saving my time, Awesome tutorial!

  • @Gen1us707
    @Gen1us707 18 днів тому

    i never noticed the orientation indicator! Thats gonna be so useful for some upcoming games!

  • @AnmGeek
    @AnmGeek 7 місяців тому +1

    This is my second video and I'm learning so much!!! Thank you for the tips, it helps me get one step closer to my dream of becoming a famous developer!! YOU DESERVE MORE SUBS

  • @Fish_CR
    @Fish_CR 2 роки тому +10

    Your incredibly easy to follow along, thank you!

    • @IdkLukas
      @IdkLukas 2 роки тому

      Incredible "Easy" huh? When I ran the game at 10:12 the zombies didn't spawn! So much for "Easy"

    • @m4urivfx
      @m4urivfx 2 роки тому +1

      @@IdkLukas The code may be old at this point; I followed along perfectly, even rewatched a few times, and the zombies don't spawn.

    • @alanyang9815
      @alanyang9815 2 роки тому

      @@m4urivfx Same

    • @Misterdog77
      @Misterdog77 2 роки тому

      Except for when you get a million errors and realise that you've made a dumb mistake

    • @springtrap4079
      @springtrap4079 2 роки тому

      @@IdkLukas for me its working

  • @Lifehacksunder60seconds
    @Lifehacksunder60seconds 4 місяці тому +8

    if at 10:40 the mob doesnt move when spawned change
    function mob.Move(mob, map)
    local humanoid = mob:WaitFirstChild("Humanoid")
    local Waypoint = map.Waypoints
    for waypoint = 1, #Waypoint:GetChildren() do
    humanoid:MoveTo(Waypoint[waypoint].Position)
    humanoid.MoveToFinished:Wait()
    end
    to
    function mob.Move(mob, map)
    local humanoid = mob:FindFirstChild("Humanoid")
    local Waypoint = map.Waypoints
    for waypoint = 1, #Waypoint:GetChildren() do
    humanoid:MoveTo(Waypoint[waypoint].Position)
    humanoid.MoveToFinished:Wait()
    end
    Your welcome

  • @Its_me_Fez
    @Its_me_Fez 9 місяців тому

    bro it works LOL and it looks so fun!

  • @uru4123
    @uru4123 Рік тому +5

    I love your tutorials, they are very helpful, and help me learn to script!

  • @unitedstatesofasparagus9758
    @unitedstatesofasparagus9758 Рік тому +4

    my friends are trying to make a tower defense game after tower battles is being discontinued. thank you for this awesome series !

    • @z0rreal11
      @z0rreal11 Рік тому

      WAIT WHAT

    • @unitedstatesofasparagus9758
      @unitedstatesofasparagus9758 Рік тому

      @@z0rreal11 yep planet got a career therefore its discontinued

    • @Mary-qt4jq
      @Mary-qt4jq 3 місяці тому

      @@unitedstatesofasparagus9758 bro thats why i am here

    • @SusMystery
      @SusMystery 28 днів тому

      @@unitedstatesofasparagus9758 yeah... );

  • @noobi_123zol-iu4bc
    @noobi_123zol-iu4bc 9 місяців тому

    thx very much for this video that was the last thing for my game😀

  • @Maseracersix
    @Maseracersix 8 місяців тому

    great job

  • @zee0016
    @zee0016 2 роки тому +3

    Noah's Archive recommended you during a stream to help me script my game, I'm not disappointed.
    Thank you alot for teaching me how to script

    • @GnomeCode
      @GnomeCode  2 роки тому

      Woah cool shout out. Welcome aboard!

    • @Penguinza
      @Penguinza 2 роки тому

      @@GnomeCode hey, my script won’t spawn the zombie and it says it doesn’t exist

    • @HR_DL
      @HR_DL 2 роки тому

      @@Penguinza just rewatch it and make sure u haven't done anything wrong

    • @Penguinza
      @Penguinza 2 роки тому

      @@HR_DL my code is *pretty* similar

    • @MagicMystro
      @MagicMystro 2 роки тому

      @@Penguinza check to see if all your parts are named right and in the right folder

  • @Annithro
    @Annithro 2 роки тому +9

    Amazing job on the tutorials, Keep the amazing work up!

  • @joeyboyok40K
    @joeyboyok40K 8 місяців тому

    amazing make game !! thank you for tutorial ^^

  • @Scout71
    @Scout71 9 місяців тому +5

    Without this guy I wouldve probably failed making a tower defense game

  • @glitchgaming6347
    @glitchgaming6347 2 роки тому +4

    I love playing tds games and this was the only one that was clear and helpful to make one, so thank you for helping.

  • @woopcanjoe456
    @woopcanjoe456 9 місяців тому

    Tysm I'll make sure to add credits

  • @hazelGD-jx9ed
    @hazelGD-jx9ed 8 місяців тому +67

    This took me 30 min so here:
    Mob Script:
    local ServerStorage = game:GetService("ServerStorage")
    local mob = {}
    function mob.Move(mob, map)
    local humanoid = mob:WaitForChild("Humanoid")
    local waypoints = map.Waypoints
    for waypoint=1, #waypoints:GetChildren() do
    humanoid:MoveTo(waypoints[waypoint].Position)
    humanoid.MoveToFinished:Wait()
    end

    mob:Destroy()
    end
    function mob.Spawn(name, quantity, map)
    local mobExists = ServerStorage.Mobs:FindFirstChild(name)

    if mobExists then
    for i=1, quantity do
    task.wait(0.5)
    local newMob = mobExists:Clone()
    newMob.HumanoidRootPart.CFrame = map.Start.CFrame
    newMob.Parent = map.Mob
    coroutine.wrap(mob.Move)(newMob, map)
    end
    else
    warn("Mob not found:", name)
    end
    end
    return mob
    Main Script:
    local mob = require(script.Mob)
    local map = workspace.Your map --- Put your map name.
    for wave =1, 5 do
    print("WAVE STARTING:", wave)
    if wave < 5 then
    mob.Spawn("Zombie", 3 * wave, map)
    elseif wave == 5 then
    mob.Spawn("Zombie", 100, map)
    end

    repeat
    task.wait(1)

    until #map.Mob:GetChildren() == 0

    print("WAVE ENDED")
    task.wait(1)
    end

    • @watkj7
      @watkj7 8 місяців тому +11

      mobs wouldnt spawn

    • @stud84
      @stud84 7 місяців тому +2

      Thank you i highly appreciate that

    • @ClatoqFN
      @ClatoqFN 6 місяців тому +1

      ty

    • @coocookids2515
      @coocookids2515 5 місяців тому +2

      @@watkj7 Same

    • @OfficialZephR
      @OfficialZephR 3 місяці тому +1

      in line 24 you made it map not map.Mob

  • @TheSteveAnimates
    @TheSteveAnimates 2 роки тому +60

    Gnomecode when you will make the lobby of this td tutorial? Like how to make a shop for buying towers you get it if you played tower battles or other tds game in roblox
    Edit: i never got 9 likes on a comment, thanks

    • @RichRBLX
      @RichRBLX 2 роки тому +5

      this is the second video slow down buddy

    • @sebastiandziekanowski2383
      @sebastiandziekanowski2383 2 роки тому

      The hardest part

    • @Blue-Square
      @Blue-Square 4 місяці тому

      idk if you watched yet or not but he made that

    • @goose13378
      @goose13378 3 місяці тому

      ok last vido out now its okey @@RichRBLX

    • @goose13378
      @goose13378 3 місяці тому

      aha i have@@Blue-Square

  • @scott7827
    @scott7827 Рік тому +136

    2:15 map script full build
    2:48 main script full build
    4:36 main script full build part 2
    6:16 mob script full build
    7:17 mob script full build part 2
    9:39 mob script full build part 3
    10:08 map script full build part 2
    10:50 mob script full build part 4
    12:19 mob script fix full build
    13:19 bit change of mob script
    13:42 map script fix change
    14:32 bit fixes
    14:46 changed map script
    16:34 map script part 3
    18:32 wave script fixed

    • @user-pv6gt4wp6t
      @user-pv6gt4wp6t 11 місяців тому +6

      thx bro

    • @abangadikchannel3947
      @abangadikchannel3947 9 місяців тому +3

      This really helps so much bro thank you so much

    • @goelrads
      @goelrads 9 місяців тому

      thx so much

    • @HaiderRBLX
      @HaiderRBLX 8 місяців тому

      I have successfully created my game, it’s called bathtub tower defense

    • @TvPanzer
      @TvPanzer 7 місяців тому

      ​@@HaiderRBLX for me the zombies won't spawn in after 9:59 any idea on how to fix that all the words mob in the mob script are underlined

  • @skittle74
    @skittle74 6 місяців тому

    HELLO MY FELLOW GNOMES
    never gets old *sniff*

  • @fierzy_new
    @fierzy_new 2 роки тому +12

    I’ve really enjoyed this series… It will really help my tower defense game. If I ever need help this is definitely the channel. Thanks GnomeCode!

  • @MattysWorldOfficial
    @MattysWorldOfficial Рік тому +68

    Hey GnomeCode love this series so far. I have noticed the zombie does not spawn in the spawner and I see I am not the only person with this problem. If you could make a updated version or comment back the newer script that would be great! Thank you. :)

    • @bored.boring
      @bored.boring Рік тому +6

      I’m having this exact same problem. I just hope somebody knows how to fix this.

    • @aaaaaaaaaaa.a
      @aaaaaaaaaaa.a Рік тому +6

      Does it say "Start is not a valid member of Workspace "Workspace""
      Edit: i redone this part but my friend deleted the game

    • @jamesegg7372
      @jamesegg7372 Рік тому +3

      @@aaaaaaaaaaa.a not for me, no.

    • @Aryuatro
      @Aryuatro Рік тому +11

      make sure the spawn part is anchored and CanCollide off
      if so, move that spawn part into your map name folder, and go to the mob script.
      at 7:18, you can put the code he uses
      im new to scripting too, so hopefully this works for you

    • @MattysWorldOfficial
      @MattysWorldOfficial Рік тому +4

      I think it’s because Roblox studio has updated

  • @adammabrouk5417
    @adammabrouk5417 5 місяців тому +3

    Yo GnomeCode part 1 was not Hard and i liked that but Part 2 uhhh it shows me an error is there any way u could help me fix it it says ' ServerScriptService.Main.Mob:9: attempt to index nil with 'CFrame' i really wanna make a Tower defence game but thanks for the tutorials they really help me

    • @matteopalermo851
      @matteopalermo851 5 місяців тому

      just put map where you said the map name.

  • @miniesofficialbeta2247
    @miniesofficialbeta2247 2 роки тому +35

    Hey! I love scripting and im trying to learn as much as possible and this really helps me get inspiration and gets me more into developing! Thank you so much for every video! Right now I'm trying to learn CFrames a bit more.
    Great video though!
    Keep up the good work!
    Gnome Gang Forever!
    Edit: Fixed some missspells.

    • @user-gh9gu5mj3f
      @user-gh9gu5mj3f 2 роки тому +1

      Ok

    • @GnomeCode
      @GnomeCode  2 роки тому +8

      Great to hear!

    • @KeikoRoblox
      @KeikoRoblox 2 роки тому

      @@GnomeCode answer me pls

    • @EvertOfficial
      @EvertOfficial 2 роки тому +2

      @@GnomeCode I was wondering if you are able to make towers and make them animatable?
      If you do please make a video about them!
      I really need it for my tower defense game

    • @GnomeCode
      @GnomeCode  2 роки тому +2

      @@EvertOfficial It wouldn't be a tower defence game without towers! They'll be coming in the series soon

  • @soulforkroblox
    @soulforkroblox 2 роки тому +55

    its awesome how instead of just telling you what code to write he shows what mistakes people make and how to improve them

  • @Kroodos
    @Kroodos 9 місяців тому +5

    It's normal that at 10:50 I have the same code as you but it don't wants to move ?
    I did this with another mob. So It's correct or not ?

  • @martinjebest
    @martinjebest 7 місяців тому +1

    tysm for helping me with tower defense game you are my favourite builder youtuber

  • @u1aq
    @u1aq 2 роки тому +8

    when he calls me a fellow gnome it makes me happy

  • @chrispayne7204
    @chrispayne7204 2 роки тому +109

    At some point in this series (probably the last epsiode) you could show how to make multiple maps and a way to choose which map you join (the two most common being matchmaking or elevators) aswell as other QoL features like wave skipping.
    Thanks Gnome!
    P.S. If your looking for reference, I would recommend Tower Battles, Tower Defense Simulator or Tower Blitz.

    • @zarsty3648
      @zarsty3648 2 роки тому +5

      I'd rather a gui matchmaking, but an elevator would be nice too

    • @ItzPineBlox
      @ItzPineBlox 2 роки тому +1

      Elevators are good but I hate when random people join the match

    • @RakisahNew
      @RakisahNew 2 роки тому +3

      @@zarsty3648 how about global matchmaking
      jk its extremely complicated

    • @mechaniccccc
      @mechaniccccc 2 роки тому +1

      Tower defense games that teleport you to another server are stupid, it should all happen in the same game

    • @chrispayne7204
      @chrispayne7204 2 роки тому +2

      the crux of the game (the td part) in a seperate game is far more sensible, keeps chat peaceful, less player lag, and it means you dont need complex trigger mechanisms so that a "game" doesnt start in the middle of the lobby

  • @rezi00
    @rezi00 9 місяців тому +19

    If the walking path is messed up by having a different walkspeed, just put another waypoint before the waypoint that you are having trouble with.

    • @MetaBellaOfficial
      @MetaBellaOfficial 7 місяців тому

    • @ag.hoopin
      @ag.hoopin 7 місяців тому

      How do I fix this "ServerScriptService.main.mob:9: attempt to index nil with 'CFrame'

    • @crevyt1
      @crevyt1 6 місяців тому

      you are a hero

    • @itznotbailey
      @itznotbailey 6 місяців тому

      10:34 i’m having trouble, get children is not a valid member of folder workspace.Grassland.Waypoints any help?

    • @itznotbailey
      @itznotbailey 6 місяців тому

      like 8 of the mob script

  • @Th3H3ck
    @Th3H3ck Місяць тому

    Its a Banger Video with all this Explaining and helpful stuff. My Problem is just that i cant spawn them cause it calls some kind of Nil Value

  • @Da_Dog1010
    @Da_Dog1010 2 роки тому +17

    Solve from zombie spawn: if module script is named Mob name all the mob Mob with cap M like this: local ServerStorage = game:GetService("ServerStorage")
    local Mob = {}
    function Mob.Spawn(name, map)
    local MobExists = ServerStorage.Mobs:FindFirstChild(name)

    if MobExists then
    local newMob = MobExists:Clone()
    newMob.HumanoidRootPart.CFrame = map.Start.CFrame
    newMob.Parent = workspace
    else
    warn("Requested mob does not exist:")
    end
    end
    return Mob
    you can copy and paste that

    • @RODRIGOOBOSS
      @RODRIGOOBOSS 2 роки тому

      I will test it

    • @RODRIGOOBOSS
      @RODRIGOOBOSS 2 роки тому

      Dont worked

    • @Da_Dog1010
      @Da_Dog1010 2 роки тому

      @@RODRIGOOBOSS first the module script need to be called Mob and you need already the start part

    • @RODRIGOOBOSS
      @RODRIGOOBOSS 2 роки тому

      @@Da_Dog1010I already solved the problem I googled and found a reddit that gave a script and it worked. But now I don't know how to destroy the npc at the end because when I put the reddit guy's script the npc was already moving. Can you help me with this problem?

    • @Da_Dog1010
      @Da_Dog1010 2 роки тому

      @@RODRIGOOBOSS i dont know now because im stuck in collide part 3 and cant remember

  • @RickAstley1234
    @RickAstley1234 Рік тому +5

    this series is really good! better quality than any classes!

  • @streemotion8336
    @streemotion8336 2 роки тому +4

    When yours doesn't work but you still support the creator for making awesome content and helping other people so you subscribe

  • @Salm0nOperator
    @Salm0nOperator 5 місяців тому +1

    i have a question, when i got to the part where the part spawns in the zombies, it always says your module experienced an error while loading, can someone help me?

  • @aqourssunshine6572
    @aqourssunshine6572 2 місяці тому

    The coroutine is giving me error messages and I cannot figure out how to fix it. Ive tried looking into coroutines online and even if ive read the solution my implementation of it did not fix. is there anywhere else i could go to get assistance? the error message is " invalid argument #1 to 'wrap' (function expected, got nil) "

  • @rexyvrgt
    @rexyvrgt 11 місяців тому +4

    I need help, in main when I put “wave, map” it says, “Argument count mismatch. Function ‘mob.Spawn’ expects 0 to 2 arguments, but 3 are specified. Any help?

    • @Blue-Square
      @Blue-Square 4 місяці тому

      i think u need to put wave, quanitity, map

  • @Feptix
    @Feptix 2 роки тому +3

    hey just some suggestions for things that would be good for a full on tower defense game
    Money that you can spend on towers and upgrading them in game (obviously)
    Towers that can be upgraded (of course) (5 different levels could be good enough, and them changing appearance based on what level they are would be cool too)
    A Farm tower (something that would give you different amounts of money per wave)
    A support tower (like the DJ in TDS, providing buffs to the towers nearby it, and the perks getting better as they upgrade, like a small discount for upgrading)
    Tower skins (things that would reskin your tower but still do the same thing)
    A lobby, where you can go into an elevator or something to start a round, and also equip your different towers.
    Also just something i think would be cool
    Different enemies that would spawn depending on what map is chosen, like a swamp map would spawn swamp monsters, they'd all be the same at the end of the day just look different
    I dont expect most of these to get in because they might be kinda complicated

    • @fan0
      @fan0 2 роки тому

      I also suggest adding "Skip Wave" button to skip to another wave

    • @JustAClumsyBoi
      @JustAClumsyBoi 2 роки тому

      OMG HAIIII! its me. your fan :D

    • @reddeadleisure
      @reddeadleisure 2 роки тому

      "(Like DJ in tds)" pain, misery, agony, dread.

    • @reddeadleisure
      @reddeadleisure 2 роки тому +1

      Tower battles is being done dirty, I literally saw someone else say like the commander from tds

    • @fan0
      @fan0 2 роки тому

      @@reddeadleisure Actually, TDS copied TB

  • @aghataeerika208
    @aghataeerika208 2 місяці тому

    Yes it finally works!

  • @GdDrawings
    @GdDrawings 4 місяці тому +2

    The code works perfectly fine for me

  • @mrmut3
    @mrmut3 2 роки тому +9

    You're great at explaining things. I'm very interested in scripts regarding combat. So far I've been using RED Plys to learn how to make a combat script, but I feel his tutorials are very hard to follow for someone who's still trying to learn. I would like to know if you ever plan on making a tutorial on combat. If you do can you make a combat script similar to RED Plys?

    • @asensmpb7221
      @asensmpb7221 2 роки тому

      Kinda agree quite hard too follow

  • @MrGreenyJr
    @MrGreenyJr 2 роки тому +6

    At line of code 23 in the Enemies(aka Mobs) module script it tries to call a NIL value, I have tried to change it so many times and it just doesn't work. Could you please help me? Also I replaced mob with enemy (The Code is: enemy.Move(enemy, map))

  • @dielegobrosausbayernsim7112
    @dielegobrosausbayernsim7112 8 місяців тому

    Respect i cant make a game im so bad in this but you are god respect

  • @JC-ro9wo
    @JC-ro9wo 9 місяців тому

    Thank you!! Sr, Lets move to #3

  • @PineBloxx
    @PineBloxx 2 роки тому +18

    This is awesome Gnome!! How many episode do you think this series will be or is it unknown right now?

    • @miniesofficialbeta2247
      @miniesofficialbeta2247 2 роки тому

      Hey Pine Bloxx, I see you quite often xD

    • @GnomeCode
      @GnomeCode  2 роки тому +11

      Unknown. As of right now I've made 2 more episodes but there's still a lot to go. We will see how much can get done before Christmas

    • @Captan40000
      @Captan40000 2 роки тому +2

      @@GnomeCode Nice! This helps me learn a lot and I like sharing it with my friends since their TD fans, and I had a previous TD project which I decided to discontinue it. This probably will make them happy, so thank you for helping me.

    • @TegoIsADev
      @TegoIsADev 2 роки тому

      ""

    • @animedude6523
      @animedude6523 2 роки тому

      @@GnomeCode we need TOWERS

  • @PDSE37
    @PDSE37 2 роки тому +4

    at first i used to just copy the scripts in the description but you explain so well i can just write it

  • @Neshy_YT
    @Neshy_YT 6 місяців тому

    hi!! i love ur vids and i'd love if you made a summoning for units!

  • @DaSwagGuy
    @DaSwagGuy 4 місяці тому +3

    Hi @GnomeCode, this series is great and have been working for me till episode 2#. I did everything you said with thie wave part, but the output always says "Requested module experienced an error while loading" when i run the game. It would be really helpful if you either commented how to fix it, or anyone else the solution to this.
    Thank you for reading
    TheGreenDino

  • @leelum9107
    @leelum9107 10 місяців тому +4

    Does this still work? I got everything working up to the part where you get the mobs to move after being spawned. I checked everything in my scripts over ten times and I have everything right but the zombies still aren’t moving after spawning.

  • @microman4life962
    @microman4life962 2 роки тому +6

    i tried following along and apparently the script tries to index nil on start because my model does not have a humanoidrootpart inside so i thought i could substitute that with a part that already exists on the modele (ex.torso) instead (fixed by adding in a humanoidrootpart, however now it doesn't exist)

  • @TheRealFlinxy
    @TheRealFlinxy 6 місяців тому +1

    Hey GnomeCode, i was trying to do your tutorial, but when i played the map no zombies spawn how do i fix it?

  • @Bunnoy.Oficial
    @Bunnoy.Oficial Рік тому +6

    10:10
    my zombies dont spawn bro, like not even 1 zombie.
    What seems to be the issue?

  • @bendogvx3073
    @bendogvx3073 2 роки тому +7

    Can we just appreciate how much times he spends just to teach us

    • @ZIMOU2014
      @ZIMOU2014 2 роки тому

      I'm not gonna make a TD game with his vids but I'm watching for fun

  • @ralphhartman4
    @ralphhartman4 5 місяців тому

    OMG NVM IT WORKS!!!! IN MAIN, FOR THE END OF IT "MAP" get rid of the quotation marks. Double check for spelling and exact words!

  • @adamwest1
    @adamwest1 2 місяці тому +2

    for anyone who didnt know to copy and paste at 8:51 heres the script:
    local zombie = script.Parent
    local waypoints = workspace.Waypoints
    for waypoint=1, #waypoinnts:GetChildren() do
    zombie.Humanoid:MoveTo(waypoints[waypoint].Positio)
    zombie.Humanoid:MoveToFinished:Wait()
    end

  • @justygaming0
    @justygaming0 10 місяців тому +5

    How do i make models without the humanoid part move around the track?

  • @Pyr0Blox1
    @Pyr0Blox1 2 роки тому +12

    Can We All Enjoy the effort this man put into this video for all of us so can we all like his videos

    • @CasualHumanBeing132
      @CasualHumanBeing132 2 роки тому

      Lets appriciate for this guy's comment for not supporting the channel and gets likes

  • @veronicapang4800
    @veronicapang4800 Місяць тому

    The most underrated youtuber

  • @ii_brqkenheqrts6044
    @ii_brqkenheqrts6044 2 роки тому +5

    Hi, think you might remember me, I came across your channel when you still had below 1k subscribers.I really enjoy your content and I hope to see you progress in your youtube channel and career,
    All of these videos you've made have inspired me to learn scripting
    (well I still really can't, cause I have a very smooth brain) and learn other stuff as well.
    Please continue to make good content and inspire others to get into development.

    • @GnomeCode
      @GnomeCode  2 роки тому +2

      Thanks for dropping by with the kind words, really appreciate it. If you're looking for a more gentle introduction to scripting I'd recommend checking out my 'First Game' learn to script series.

    • @wistygg9268
      @wistygg9268 2 роки тому

      @@GnomeCode hi gnome I can’t get the CFrame bit to work it says CFrame index = nil or something

    • @MagicMystro
      @MagicMystro 2 роки тому

      @@wistygg9268 What you want to do is put the start part into the grassland folder

    • @joshrz4289
      @joshrz4289 2 роки тому

      @@MagicMystro can you help me with something? in the output it says Requested module experienced an error while loading - server - main:1
      and the zombies arent spawning in

    • @delangaming5388
      @delangaming5388 Рік тому

      @@GnomeCode need help my zombie wont spawn

  • @o_o7yt
    @o_o7yt Рік тому +3

    Listening to the output really does help when something is broken. May take a couple of minutes to find the problem.

  • @ViperHut
    @ViperHut 4 місяці тому

    to everyone saying it dont work i have said that and i have had to relax once i relaxed i watched the video in detail and copied and it worked perfectly fine i will not be providing script as u will not work hard and u need that mindset for a game

  • @arccent8
    @arccent8 6 місяців тому +1

    Can anyone help me with something? Instead of the zombie model I used an normal rig I did everything but when I test it it says to the output "InsertService cannot be used to load assets from the client" pls someone help me, i am new and i have no idea what do i have to do.

  • @lukiValent
    @lukiValent 2 роки тому +15

    you can also animate the enemies through the module
    so you dont have to make animate script for every enemy

    • @MK8Warrior
      @MK8Warrior 6 місяців тому

      How

    • @lukiValent
      @lukiValent 6 місяців тому

      @@MK8Warrior 1 year old post, but I now use another enemy system to animate, with 1 single localscript.

    • @MK8Warrior
      @MK8Warrior 6 місяців тому

      @@lukiValent what’s the script?

    • @lukiValent
      @lukiValent 6 місяців тому

      @@MK8Warrior I made it myself for my game, but basically when an enemy is spawned server-side, it is just a stud. When the client receives the newly created enemy, it will give it its enemy model and animate the model. I'm using the OnChildAdded event to replicate the enemies on client.

    • @MK8Warrior
      @MK8Warrior 6 місяців тому

      Is your game finished? If so could you help me@@lukiValent

  • @luke5964
    @luke5964 2 роки тому +4

    at 0:42 for him it shows service script but dosent for me on roblox studio. why is this?

    • @Skelebones-VR
      @Skelebones-VR Місяць тому

      You have to add it before you start
      Am I too late?

  • @ero_films
    @ero_films 3 місяці тому +2

    My Error says Requested mob does not exist ▼ {
    ["Move"] = "function",
    ["Spawn"] = "function"
    } - Server - Mob:22
    please help!

  • @yourcertifiedlonely
    @yourcertifiedlonely 18 днів тому

    hey there i need help,
    so my zombies are not spawning and output says mob does not exists tho i try to do it again, but the #waypoints is to shown as red underlined

  • @hambugha21
    @hambugha21 Рік тому +3

    I need help I rewrote the script and checked it over (the mob one) and the zombies still aren’t moving I need help I’m desperate plz

    • @hambugha21
      @hambugha21 Рік тому +2

      Btw I’m on the moving in unison one

    • @Marty_Mc_Ry
      @Marty_Mc_Ry Рік тому

      @@hambugha21 im stuck on te part where it spawns 3 zombies, mine only spawns 2, the last one only has a humanoid in it. no body

  • @jmproyt3454
    @jmproyt3454 Рік тому +6

    If you're zombie isn't moving there is a possibility that you missspelled or missplaced a folder or model. if you're getting "Waypoints is not a valid member" error. you might have misspelled your "Waypoints" like i did or misspelled you're map

    • @Lyriclaboratory.
      @Lyriclaboratory. Рік тому

      do you know the fix to this? having that error on line 9 for the waypoint

    • @AbramsTheFox1
      @AbramsTheFox1 Рік тому

      I have the same problem. But nothing's wrong
      why is this not working??

    • @z1nc95
      @z1nc95 Рік тому

      I literally can’t figure out the problem WTH

    • @AbramsTheFox1
      @AbramsTheFox1 Рік тому +2

      @pots6254 I did like 2 seconds ago, check if in line 9 and 10 you have humanoid 2 times. if yeah, remove it, so it's
      humanoid:MoveTo(waypoints[waypoint].Positionhumanoid.MoveToFinished:Wait()
      (position has a ")" on the end, but youtube comment inallowed it

    • @goldcreepergames5537
      @goldcreepergames5537 11 місяців тому

      @@AbramsTheFox1 Thank you for solving the problem. Mine is fixed

  • @arturchira1690
    @arturchira1690 8 місяців тому

    I changed the zombies name to (HUMANOID) caps and all and it finally started spawning multiple also in main (mob.Spawn etc) needs to be *mobs not mob* and it will access (mobs) folder because mob is not a folder (I had this problem for about 4-5 days and im happy i [the noob] fixed it) thanks GnomeCode

  • @sabrinajca
    @sabrinajca 4 місяці тому +2

    Nothing won’t spawn in I checked the script if I had a script error but everything was fine and I did all of the things you said. Please does anybody know how to fix this?????

    • @dijayjames380
      @dijayjames380 4 місяці тому

      I'm having the same problem... can someone help?

  • @adityabiswas7912
    @adityabiswas7912 2 роки тому +3

    Ayo Gnome, Just a question in a upcoming episode like 4 (since you probably recorded episode 3 by now) will you add modes? like normal and hard mode?

  • @Griff_FN
    @Griff_FN 6 місяців тому +4

    Hey Gnome! I am using an alien as my mob instead of a zombie, and around 10:00 when I try to spawn in multiple of the Mobs, it only spawns one.
    EDIT: I figured out it was an error with the model I was using, solved it!

    • @FrostyGT
      @FrostyGT 6 місяців тому

      How do you get them to move :(

    • @Griff_FN
      @Griff_FN 6 місяців тому

      @@FrostyGT I would just double check your script, but for me once I switched my model it worked fine!

    • @The_Real_Mini
      @The_Real_Mini 5 місяців тому

      tell me how it doesn't work for me too

    • @Griff_FN
      @Griff_FN 5 місяців тому

      @@The_Real_Mini Like I said just try using a different model. Make sure that it is not anchored. It took me some time to find the right model, tell me if you need any more help

    • @Swartzplayss
      @Swartzplayss 5 місяців тому

      my zombies spawns but it does not move@@Griff_FN

  • @user-qb8hj9ud3x
    @user-qb8hj9ud3x 2 місяці тому +1

    Gnome i dont know how to fix to the zobmie spawn (6:57) i will be happy if you help me

  • @liamdabomb
    @liamdabomb 4 місяці тому

    it says Requested module experienced an error while loading. in ServerScriptService but i literally have the same scripts, maybe its outdated? idk can you help

  • @svlylly
    @svlylly 6 місяців тому +4

    Friends, I solved the problem of Zombie not appearing :)
    code for Mob
    local ServerStorage = game:GetService("ServerStorage")
    local mob = {}
    function mob.Move(mob, map)
    local humanoid = mob:WaitForChild("Humanoid")
    local waypoints = map.Waypoints
    for waypoint = 1, #waypoints:GetChildren() do
    humanoid:MoveTo(waypoints[waypoint].Position)
    humanoid.MoveToFinished:Wait()
    end

    mob:Destroy()

    end
    function mob.Spawn(name, quantity, map)
    local mobExists = ServerStorage.Mobs:FindFirstChild(name)
    if mobExists then
    for i=1, quantity do
    task.wait(0.5)
    local newMob = mobExists:Clone()
    newMob.HumanoidRootPart.CFrame = map.Start.CFrame
    newMob.Parent = map.Mob
    coroutine.wrap(mob.Move)(newMob,map)
    end

    else
    warn("Requested mob does not exist:", name)
    end
    end
    return mob
    code for Main
    local mob = require(script.Mob)
    local map = workspace.Grassland
    for wave=1, 5 do
    print("Wave starting:", wave)
    if wave

    • @williammega2626
      @williammega2626 5 місяців тому

      mob is not a valid member of Script "ServerScriptService.Main"

    • @awesome4823
      @awesome4823 5 місяців тому

      i put ur code but the zombies dont spawn and i did everything he told me to do (gnome) but it keeps showing this error "Mob is not a valid member of Folder "Workspace.GrassLand"

    • @FPFPFPZo
      @FPFPFPZo 5 місяців тому +1

      ​@@williammega2626put whatever you named the module script into (script.mob)
      Example :
      Name of module script : Mob
      So i put in Mob in (script.Mob)
      Capital letters matter.

    • @FPFPFPZo
      @FPFPFPZo 5 місяців тому

      ​@@awesome4823Is it the main or mob script?

    • @the_cloaker
      @the_cloaker 2 місяці тому

      @@FPFPFPZo for me its main