Animated Tower Attacks - Tower Defense Tutorial #7

Поделиться
HTML-код
  • Опубликовано: 31 окт 2024

Комментарии • 2,3 тыс.

  • @fire.maniac.
    @fire.maniac. 2 года назад +82

    Man, for 2+ years I have been looking for a tower defense game tutorial. Every 1-3 weeks I searched for a tutorial... and boom, an amazing tutorial has appeared on youtube! THANK YOU!

    • @youkdo_playz2818
      @youkdo_playz2818 2 года назад +3

      Same bro.

    • @akiprox7
      @akiprox7 Год назад +3

      wow nice

    • @ToasterDuds6000
      @ToasterDuds6000 Год назад +3

      100% same case for me! Im new to developing and this is walking through the steps and really immersing me into it and Im actually understanding scripting now!

    • @kawaii_creaturechan
      @kawaii_creaturechan Месяц назад

      same

  • @alexanderholmgaardlindholt4922
    @alexanderholmgaardlindholt4922 2 года назад +23

    Great, simple and easy to follow tutorial for beginners!
    Edit: i would also say, you upload alot, i don't no any other Roblox Studio Developer on RUclips uploading this quick! Great job GnomeCode! (Both great and fast)

  • @HyperLeopard
    @HyperLeopard 2 года назад +98

    To be honest this has been the best tower defence tutorial I’ve seen on youtube because it’s so much more simple and shorter than the others so keep up the good work I’m looking forward to the lobby and the cash system

    • @GnomeCode
      @GnomeCode  2 года назад +28

      Great to hear thank you, more videos on the way!

    • @MyNamesAveren
      @MyNamesAveren 2 года назад +3

      i think this is one of the few td tutorials, most of the td making videos are dev logs

    • @notavaillable
      @notavaillable 2 года назад +1

      @@MyNamesAveren true

    • @guyfrommars1110
      @guyfrommars1110 2 года назад +1

      @@GnomeCode when i try to do the FindNearestTarget function i write it exactly like you did but it doenst work. Can you please explain why? i wrote it like you did i dont understand
      edit:i can send you a screen shot
      edit2:when i switch the tower to a part it works just fine but when i make the local distance
      (target.HumanoidRootPart.Position - newtower.HumanoidRootPart.Position).Magnitude
      it just doesnt work but it didnt leave anything in the output
      also i set the variable for newtower with all lowercase

    • @gabrielmartynaik3028
      @gabrielmartynaik3028 2 года назад

      @@guyfrommars1110 check the spelling

  • @viber0438
    @viber0438 2 года назад +95

    Small tip for people watching:
    If you want the tower to face the enemy instantly, in the Tower module script at line 32 (line visible in video on 26:57) remove the "Bodygyro" so it's HumanoidRootPart.CFrame = targetCFrame
    Also obiously you will need to change the code at line 54 (line visible in video on 27:22) in the same script:
    local CFrame = Instance.new("CFrameValue")
    CFrame = Vector3.new(math.huge, math.huge, math.huge)
    CFrame = newTower.HumanoidRootPart.CFrame
    Great video btw, keep it up man 💪

    • @bingjnjgie4532
      @bingjnjgie4532 2 года назад +1

      THANK YOU DUDE I was stuck there I didn't know how to get past that

    • @0bit096
      @0bit096 2 года назад

      tysm!

    • @TorchDud
      @TorchDud 2 года назад

      Thanks You I Was Stuck There For 1 day

    • @ComradeCheesey
      @ComradeCheesey 2 года назад

      bro you're a legend tysm

    • @wickedme2016
      @wickedme2016 2 года назад

      TYSM I was stuck here for 2 days

  • @eggomyleggos5247
    @eggomyleggos5247 2 года назад +17

    this man is amazing, i followed a different one previously and it was very hard to follow, this right here is just god-tier. can't wait for this series to be finished

  • @gamingguy9509
    @gamingguy9509 2 года назад +52

    if your attack animations arent working, even if you redid the script 10 times do the following:
    1) make sure the idle animation is set to "Idle" in Priority, and the attack animation set to "Action" priority.
    2) make sure the idle is looping and the attack isnt.
    these helped me fix my animations

    • @LightCat22a
      @LightCat22a 2 года назад

      thanks you helped me

    • @_Haszy_
      @_Haszy_ Год назад +1

      Can u share ur animations script?

    • @ISOPL2
      @ISOPL2 Год назад +1

      Dude, thanks for the help!

    • @MarianHere
      @MarianHere Год назад +3

      Mine just give me error "Infinite yield possible on 'Workspace.Towers.Pistol:WaitForChild("Animations")'"

    • @dragosilie5940
      @dragosilie5940 Год назад +2

      @@MarianHere me too

  • @cub0id
    @cub0id 2 года назад +34

    Even though I don't follow along with these tutorials, they still help me learn a lot of stuff about programming I didn't know before. Thanks GnomeCode! :)

  • @WavenadoDaTornado
    @WavenadoDaTornado Месяц назад +4

    I love when GnomeCode says: "(Something bad) which is a little rubbish."

  • @oscmatis
    @oscmatis 2 года назад +6

    if your attack animation merges within the idle one, make sure your attack animation is set priority to Action when you make it, you can edit it later too, if you open it where you create/edit animations

    • @gamingguy9509
      @gamingguy9509 2 года назад +1

      dude you saved me on the last video and now you're saving me again???

    • @catalindc2official467
      @catalindc2official467 Год назад

      Thanks

    • @lordwigstyle8017
      @lordwigstyle8017 Год назад +2

      I just dont get it mine is action priority and its not looped. While my idle animation is looped and set to idle but they still merged

    • @Dylan-db2ol
      @Dylan-db2ol Год назад

      @@lordwigstyle8017 did you find out why?

    • @lordwigstyle8017
      @lordwigstyle8017 Год назад

      @@Dylan-db2ol Nope i never found out, i gave up after trying for hours upon hours

  • @vevcredthegreat9360
    @vevcredthegreat9360 9 месяцев назад +5

    For those of you struggling with animations, when he makes the configuration folder you must rename it Animations.

    • @goldenollies8338
      @goldenollies8338 9 месяцев назад +1

      a configuration folder isnt even a thing anymore i cant find it

    • @vevcredthegreat9360
      @vevcredthegreat9360 9 месяцев назад

      @@goldenollies8338 It isnt a folder just search up Configuration and rename it to "Animations" for the animations to work properly.

    • @iamnotastickman
      @iamnotastickman 8 месяцев назад

      thank you so much bro

    • @veaga5893
      @veaga5893 7 месяцев назад

      can you tell me? I did exactly the same thing, but the attack animation plays endlessly, how did you change this line of code? I'm just curious

    • @vevcredthegreat9360
      @vevcredthegreat9360 7 месяцев назад

      @@veaga5893 In the video your config folder must be named "Animations", in the video he cuts ahead to him just making a new one when his is already there.

  • @munchienoober7101
    @munchienoober7101 2 года назад +6

    Yo, this may sound sarcastic, but it was my dream to make a tower defence game, and you made that dream real : ) Thanks so much GnomeCode

  • @funnyguy5651
    @funnyguy5651 2 года назад +7

    I love this since as a beginner myself i can still edit the scripts and all since i actually understand what and why(he does a great job at explaining). Keep it up!

    • @GnomeCode
      @GnomeCode  2 года назад +5

      Awesome, great to hear

    • @guyfrommars1110
      @guyfrommars1110 2 года назад +1

      ​@@GnomeCode ​when i try to do the FindNearestTarget function i write it exactly like you did but it doenst work. Can you please explain why? i wrote it like you did i dont understand
      edit:i can send you a screen shot
      edit2:when i switch the tower to a part it works just fine but when i make the local distance
      (target.HumanoidRootPart.Position - newtower.HumanoidRootPart.Position).Magnitude
      it just doesnt work but it didnt leave anything in the output
      also i set the variable for newtower with all lowercase

    • @1vp78z
      @1vp78z 2 года назад +2

      @@guyfrommars1110 Same problem with me, did we ever figure out the problem?

    • @darkgamer1070
      @darkgamer1070 Год назад

      ​@@guyfrommars1110 did you put the prinary parts

    • @flynnrm
      @flynnrm 4 месяца назад

      @@GnomeCode gnomecode, this tutorial is too hard for me to understand, the animsaves are too hard for me

  • @Noobyoulus
    @Noobyoulus 4 месяца назад +2

    EVERYONE!!!! IF the animations STILL merge after setting the priorities and the looping right 1000 times, it's because the attack or idle animation is too short. I tried having an attack animation that was 3 frames and it still merged, so I made it longer and it worked

  • @ruskismerf3131
    @ruskismerf3131 2 года назад +2

    Yall i deadass dont want to make a td game but i watch these vids ro learn something and enjoy it at the same time, anyways HAPPY NEW YEAR FROM POLAND🇵🇱🇵🇱

  • @callmecarrots9628
    @callmecarrots9628 2 года назад +6

    These tower defense tutorials are amazing! If you aren’t already planning to, I would suggest thinking about creating a placing system more similar to other tower defense games perhaps, a deck of towers you can place, upgrading your towers, and all the lobby features such as spawning into different maps, buying, equipping, and sorting through your units. If you do continue through this series, I’m sure it’s going to be a huge hit and might inspire a couple more tower defense games to show their faces on Roblox! Super excited to see what you do next, great work as always Gnome :D
    P.S. Oh, you can also plan to include interesting mechanics for some of the towers, such as being placed on cliffs, freezing, slowing, etc. Also enemy mechanics such as knocking out or stunning the towers around them. Great work as always!
    P.S.S. lol this is brainstorming please don’t get the wrong idea, you don’t have to add any of this I’m just throwing out ideas

    • @That_stupid_guy
      @That_stupid_guy 2 года назад +1

      XD slow down buddy

    • @weezytweezy9209
      @weezytweezy9209 2 года назад

      Fr slow down. it takes very long to add such things and very hard to do.

    • @callmecarrots9628
      @callmecarrots9628 2 года назад

      it’s brainstorming

    • @RichRBLX
      @RichRBLX 2 года назад

      cliff towers can easily be done by putting the buildings roof in the folder where all the grass is

    • @callmecarrots9628
      @callmecarrots9628 2 года назад

      @@RichRBLX true, but those towers would also be able to be placed on grass, right? maybe an exclusively cliff tower would work better

  • @skittle74
    @skittle74 4 месяца назад +11

    If you want your towers to face the enemies instantly
    in the part of your tower script, where it says newTower.HumanoidRootPart.BodyGyro.CFrame = targetCFrame, just remove where it says ".BodyGyro"
    and yes, that's all you need to do. it's that simple!

    • @brakemister5111
      @brakemister5111 3 месяца назад

      the goat

    • @gunboy6784
      @gunboy6784 3 месяца назад

      Thanks it fixed it

    • @lanzaguisantes-medieval-11
      @lanzaguisantes-medieval-11 2 месяца назад

      when i removed where it says ".BodyGyro" another error appeared: ServerScriptService.Main.Tower:58: ServerScriptService.Main.Tower:13: attempt to index nil with 'HumanoidRootPart'. my tower keeps ignoring the enemies after this.

    • @TheLordTenebris
      @TheLordTenebris Месяц назад

      @@lanzaguisantes-medieval-11HumanoidRootPart.CFrame

    • @FlaminFish750
      @FlaminFish750 19 дней назад

      when I remove it, my towers shoot then they turn back to their original cframe

  • @Jacob-nw7uh
    @Jacob-nw7uh 2 года назад +4

    1 Infinite yield possible on 'Workspace.Mobs.Basic:WaitForChild("Animation")' - Studio
    17:14:28.481 Stack Begin - Studio
    17:14:28.481 Script 'Players.JToH_SC.PlayerScripts.Animations', Line 3 - function setAnimation - Studio - Animations:3

    • @AltGaming685
      @AltGaming685 2 года назад

      Same

    • @devvyyxyz
      @devvyyxyz 2 года назад

      means a value is missing

    • @gofr96
      @gofr96 Месяц назад

      @@devvyyxyz where tho

    • @lopldey
      @lopldey 10 дней назад

      @@gofr96It should be WaitForChild("AnimationS")

  • @candykid44
    @candykid44 2 года назад +7

    Let's go, another tutorial!! I'm watching this right now. Thanks gnome!
    Notification gang 😎

  • @paulstrobeck8947
    @paulstrobeck8947 Год назад +1

    This is really helping me make my tower defense game, where every player's towers are these "cards", with their own modifiers to make them unique.

    • @justnoober
      @justnoober Год назад +1

      How did you do the BodyGyros? They dont exist anymore

    • @Ygz_Bgr
      @Ygz_Bgr Год назад

      ​@@justnooberactually its working

    • @RATATAT317
      @RATATAT317 10 месяцев назад

      @@justnoober it might look like it but they still work

    • @Burgzilla
      @Burgzilla 6 месяцев назад

      @@justnoober i dont know if you still care but you can add in objects that you cant regularly put in studio using commands (ex: Instance.new("hfushfsiu")

  • @zedsdev1202
    @zedsdev1202 2 года назад +4

    heres some things you might add "more towers" and "healthbars" and a "working base damage and lose" "wave texts" a "lobby" and "the enemy speed and enemy health" and a "boss" and a "shop where you buy towers" and "stun scripts" and "Win Script"

    • @despwned_PL
      @despwned_PL 2 года назад

      That's kinda cool idea!
      Be patient GnomeCode will do something great soon!

    • @typicalaverage
      @typicalaverage 2 года назад

      Enemy speed and health is quite easy and it works like a charm, just go to Humanoid, and change "Health" + "MaxHealth" to whatever you want, and walkspeed to also whatever you want. If your zombie is half the size of a normal R6 avatar, I'd recommend keeping the walkspeed at more than 3.25.
      Thats to prevent humanoid timeout (which happens when target doesnt reach destination in less than 8 seconds)

    • @zedsdev1202
      @zedsdev1202 2 года назад +1

      @@typicalaverage ye

    • @guyfrommars1110
      @guyfrommars1110 2 года назад

      @@typicalaverage well i just tackled that with waypoints in between path
      also why the hell did roblox add humanoid timeout
      even if they did add that
      they should make it a parameter and not a auto

    • @jinxed-truly
      @jinxed-truly 3 месяца назад

      @@guyfrommars1110 To make it look better, instead of putting extra waypoints which makes the movement off-centered, try to instead repeat the MoveTo() function until it is finished

  • @PineBloxx
    @PineBloxx 2 года назад +9

    Happy new year Gnome! 2021 was a well deserved great year for this channel and am excited for what’s to come!

  • @flightingfalcon4783
    @flightingfalcon4783 2 года назад +12

    Hey GnomeCode could you maybe add a slinger on top of the castle tower like the big one that you don’t place down (if your going to keep it of course). Then it might look a little better.

  • @callmehkeiko7672
    @callmehkeiko7672 Год назад +3

    6:14 (just to remember from where i have to continue, gtg sleep now)
    Also, i know i'm a lil' late but i LOVE these tutorials!

  • @Leppux
    @Leppux 2 года назад +15

    It's always nice to see how others complete tasks.

  • @ICEDSummer
    @ICEDSummer 2 года назад +15

    I have requests:
    Cash system
    Base health
    Lobby
    Upgrading system
    teleportation system to get to the maps like the other td games
    And the player limit for each map (mega servers have the highest player limit and the normal servers have 1-4 player limit)
    New health system for Mobs (when you hover over the mob it will show its health, if you dont want that just show the health above the mob)
    Max towers system
    More maps

    • @ThatOneSwimmer
      @ThatOneSwimmer 2 года назад

      Yes!

    • @idkk5335
      @idkk5335 2 года назад +11

      You don't have to tell him I mean he's obv gonna do all of those stuff bc that's the basic tower defense features

    • @Slac3r
      @Slac3r 2 года назад

      im making a tutorial of that too!

    • @braidien_huangie
      @braidien_huangie 2 года назад +1

      Uhm, does anyone know why my tower floats when I unanchor the HumanoidRootPart?

    • @gokgbvg5443
      @gokgbvg5443 2 года назад

      @@braidien_huangie idk lol

  • @dragapult_1017
    @dragapult_1017 2 года назад +3

    Super simple and easy your the best coding YT and I'm exited for the next vid KEEP BEING THE BEST MAN!

  • @Serious5GamingS5G
    @Serious5GamingS5G 2 года назад +8

    Im predicting part 8 is gonna be the base's health

  • @duckr915
    @duckr915 3 месяца назад

    thanks so much man this is the best tutorial youtuber i have ever watched, i learnt so many things from just this series alone, i cant wait to do the other ones

  • @TataDanel
    @TataDanel 2 года назад +1

    the so long awaited video

  • @EXTREMEMULATION
    @EXTREMEMULATION 11 месяцев назад +6

    If the attack animation and the idle animation overlap, make sure that they both have the same number of frames, ex(30frames in attack and 30frames in idle)

    • @Bunanahz
      @Bunanahz 10 месяцев назад

      they still overlapped :(, I beleive it has something to do with the animation priorities, such as action and idle, but I can't find the 2 that play both of the full animation

    • @okayultra
      @okayultra 10 месяцев назад

      @@Bunanahz Same, I'm still searching as well.

    • @squigglesz
      @squigglesz 7 месяцев назад

      @@Bunanahz im here to save ur day (change idle to movement)

    • @daSmokingToilet46
      @daSmokingToilet46 7 месяцев назад

      ​@@squiggleszit's not working there's nothing wrong with my scripts my tower is attacking idk what's the problem I think it's because I'm using motor6D but I made a new r6 rig with the same animations still overlaps

    • @squigglesz
      @squigglesz 7 месяцев назад

      @@daSmokingToilet46 are they both different actions?

  • @hisamue
    @hisamue Год назад +10

    For those who are having problems during the idle animation part, just remember to set your configuration folder name to "Animations" or to whatever you have your script to

    • @lorlema7404
      @lorlema7404 Год назад

      I have it to animations, but After i place the tower it's idle doesnt work

    • @mysyvcic
      @mysyvcic Год назад

      ​@@lorlema7404set the animation to looping

    • @Winged_Earth
      @Winged_Earth Год назад

      I have mine but there are no error's and even in the placeholder the animation just straight up does not work

    • @Winged_Earth
      @Winged_Earth Год назад

      @@sikoranowak7991 Well I did not but I found out why. The animation I made whenever I try to Import it it does not work. Idk if urs also has the same problem but...
      I asked people on the roblox dev forum and they said it was a bug and I could not report it since I was only a member. So I ditched the game for now. If you have the same problem as me try a dif animation and see if it works if it does you have to make a new animation.

    • @cheesyblobfish8295
      @cheesyblobfish8295 Год назад

      tysm u helped me fix the anims

  • @henrythehyperrips
    @henrythehyperrips 2 года назад +5

    Thank you SO MUCH for all of this work that you are doing just to show us how to make this! This is easily the best tower defense making tutorial on RUclips in my opinion. Whenever I have a problem I can always find an answer! Thank you for this!

  • @RB21fr
    @RB21fr 2 года назад +2

    Your video tutorials are the most understandable I've seen right now
    Thank you and Happy New Year

  • @SirCursor
    @SirCursor Год назад +2

    for the people that found the tower is floating make sure your hipheight in humanoid is set to 2 so that will work with gnomecode script

    • @TutucrMapper
      @TutucrMapper Год назад

      isnt that gonna make it float even more

    • @ZenTealzz
      @ZenTealzz Год назад

      he meant divided i think
      @@TutucrMapper

  • @deadlinesssjsjsjsjs622
    @deadlinesssjsjsjsjs622 2 года назад +7

    This dude is like a teacher but a gamer one who helps you learn to make game ngl.

  • @thesad_lite7630
    @thesad_lite7630 2 года назад +4

    YOU'RE FIRST RUclipsR WHO TEACHES US HOW TO MAKE TD GAME! Also some ideas for next video: 1. Add admin commands like
    !unit tank. 2. Add abilities for bosses like stunning towers for 2 seconds. 3. Tower that could spawn cars or tanks and that cars will kill zombies when touches them.

    • @thesad_lite7630
      @thesad_lite7630 2 года назад +1

      Yeah im 116+ lvl in tds im very love this game

    • @mathoe123
      @mathoe123 Год назад +3

      @@thesad_lite7630 so uhh addons are gonna make that happen not the td tutorial so go in tower defense addons gnome code or some sort

  • @milkyway1653
    @milkyway1653 Год назад +9

    Could you do a little update or explanation on how to make the towers face the enemies since BodyGyro got deprecated and AlignRotation has a different workflow

  • @tinpothead6586
    @tinpothead6586 2 года назад +1

    Happy new year! I have just subscribed to you for being helpful! Thanks for making this series!

  • @zfaixz862
    @zfaixz862 2 года назад

    happy new years eve gnome! i hope you enjoy yourself!

  • @maurology
    @maurology 2 года назад +5

    Hi Gnomecode, I love this series but I have encountered a problem, in the 4th episode, when I try to find the distance between parts, it says: "Position is not a valid member of Model Workspace.Model". I checked your code and my code and I cant find any differences. Heres my code if you want to check it out:
    local tower = script.Parent
    local enemy = workspace.Enemy
    local distance = (tower.Position - enemy.Position).Magnitude
    print(distance)
    Thanks!

    • @GnomeCode
      @GnomeCode  2 года назад

      Remember that models do not have a 'position' property. In this episode I switched to using a model and so used HumanoidRootPart

    • @maurology
      @maurology 2 года назад

      @GnomeCode After seeing your reply, I turned my tower into a union and it worked! Thanks a lot

    • @guyfrommars1110
      @guyfrommars1110 2 года назад

      @@GnomeCode when i do humanoid root part with the towers nothing works for some reason i tried to use print to see if it works but it didnt do anything in the output
      and there are no syntax errors in the output or prints or warnings just nothing
      here is my code that i wrote ( the entire tower module)
      local serverstorage = game.ServerStorage
      local phys = game:GetService("PhysicsService")
      local ReplicatedStorage = game:GetService("ReplicatedStorage")
      local events = ReplicatedStorage:WaitForChild("Events")
      local SpawnTowerEvent = events:WaitForChild("PlaceTower")
      local tower = {}
      function FindNearestTarget(newtower)
      local MaxDistance = 15
      local nearestTarget = nil

      for i, target in ipairs(workspace.Mobs:GetChildren()) do
      local distance = (target.HumanoidRootPart.Position - newtower.HumanoidRootPart.Position)
      print(newtower.HumanoidRootPart.Position)
      if distance < MaxDistance then
      nearestTarget = target
      MaxDistance = distance
      end
      end
      return nearestTarget
      end
      function tower.Attack(newtower)
      local target = FindNearestTarget(newtower)
      if target then
      target.Humanoid:TakeDamage(5)
      end
      task.wait(3)

      tower.Attack(newtower)

      end

      function tower.Spawn(player, name, cframe)
      local towerExists = ReplicatedStorage.Towers:FindFirstChild(name)
      if towerExists then
      local newtower = towerExists:Clone()
      newtower.HumanoidRootPart.CFrame = cframe
      newtower.Parent = workspace.Towers
      newtower.HumanoidRootPart:SetNetworkOwner(nil)
      for i, object in ipairs(newtower:GetDescendants()) do
      if object:IsA("BasePart") then
      phys:SetPartCollisionGroup(object, "Tower")
      end
      end
      coroutine.wrap(tower.Attack)(newtower)
      else
      warn("the requested tower does not exist:", name)
      end
      end
      SpawnTowerEvent.OnServerEvent:Connect(tower.Spawn)
      return tower

  • @Crystal_F3ather
    @Crystal_F3ather 2 года назад +4

    Hi Gnome, I was wondering if later on. You will teach us how to make a lobby and elevators to teleport you into different maps?

    • @ajtriesedits1448
      @ajtriesedits1448 2 года назад

      I was thinking the same thing. Hoping he sees this comment

    • @Crystal_F3ather
      @Crystal_F3ather 2 года назад

      @@ajtriesedits1448 yea every single tower defense game tutorial I watch doesn’t teach how to make a full lobby, I really don’t know why

  • @nt_developer
    @nt_developer 2 года назад +5

    That's some pro content. Keep up the good job!

  • @Cookie131_
    @Cookie131_ 2 года назад +2

    Great job dude! This tutorial is amazing and I cannot wait for the next video

  • @nyankolation
    @nyankolation 2 года назад

    Thanks for doing all these tutorials!
    I'm finally understanding how the tower defense system works now.

  • @RobloxCato
    @RobloxCato Год назад +3

    Please help me with this problem: BodyGyro got deprecated and I cannot make a tower face an enemy!

    • @RobloxCato
      @RobloxCato Год назад +2

      I got a fix: you need to make the exact same code with this BOdyGyro, ignoring these deprecated warnings. If it still doesn't work try restart the studio.

  • @bbucketio
    @bbucketio Год назад +3

    I'm not using animations for my Mobs but I am using animations for my towers, is there a way to disable the animations for the Mobs but keep it for the towers? It keeps giving me errors for an 'infinite yield'

    • @madcowplayz
      @madcowplayz Год назад

      Infinite yield isn’t an error don’t worry

  • @entityofanimations3952
    @entityofanimations3952 2 года назад

    Happy new year gnomecode!

  • @andrewlacano8721
    @andrewlacano8721 2 года назад +1

    Tbh I LOVE this tower defense tutorial

  • @bloxplaysyt3602
    @bloxplaysyt3602 2 года назад +5

    gnomecode my attack animation keeps looping even though i didnt set it to loop and the range is only 10. the enemies were out of range and the animation was still constantly playing

    • @sr.dudu1233
      @sr.dudu1233 2 года назад +1

      same

    • @alvinkohjirui123
      @alvinkohjirui123 2 года назад +1

      3 questions,Is it loop,Is it action,double check the ID or remake.

    • @questmaker
      @questmaker Год назад

      Same

    • @questmaker
      @questmaker Год назад

      ​@@alvinkohjirui123thanks I did that last one

  • @ChannelDiscontinued243
    @ChannelDiscontinued243 5 месяцев назад +12

    Can you fix this tutorial, bodygyro is deprecated

    • @Notwhalecoolos
      @Notwhalecoolos 3 месяца назад +2

      Its works for me

    • @Guywithnouploadschedule
      @Guywithnouploadschedule 3 месяца назад +2

      I’m pretty sure it isn’t

    • @realBoba_
      @realBoba_ 2 месяца назад +2

      You can still use body gyros if you create them inside a script

    • @k1ng0f
      @k1ng0f Месяц назад +2

      find bodygyro in toolbox and put it in ur tower's humanoid

    • @MrfishingforPikeYt
      @MrfishingforPikeYt 20 дней назад +1

      I checked on devforum and bodyGyro is deprecated and it said use AlignOrientation instead.

  • @bruh_the_cat8912
    @bruh_the_cat8912 6 месяцев назад

    I worked on this for a long time, I can tell you how to make a working animation, you need to do everything the same on video, but only you must save the Save As animation on the character, and write it as new and its name, I say this to those who don’t it's very clear how to do it

  • @SRTdowned
    @SRTdowned 2 года назад

    Happy Summer GnomeCode! And thx for this tutorial

  • @SonicMaster519
    @SonicMaster519 2 года назад +4

    Hello, Gnome! This series is fantastic so far! However, I'm having an issue and I was wondering if you could help me. I try to edit my code like the same way you do at 22:34 but my Tower still keeps doing the attack animation. I'm pretty sure I've done the entire script correctly, and I was wondering if you could help me.
    Edited: I figured it out! Turns out, both my idle animation and attack animation were set to loop, but once I turned them both off, it broke the animations and made it so my tower held still. Turns out, if you let the idle animation loop, but not the attack animation, it works fine!

    • @subhfathesubmarine961
      @subhfathesubmarine961 2 года назад

      its either its not on action(iff its not then its gonna loop) or uve seeted it to loop(aka while making the animations u pressed the loop button and dint turn it off)

    • @Sillencec
      @Sillencec 2 года назад

      me too

    • @SonicMaster519
      @SonicMaster519 2 года назад

      @@subhfathesubmarine961 I'm not entirely sure what you mean by it not being on action, and after testing your loop button theory, it just makes the character hold completely still after finishing their animation.

    • @SonicMaster519
      @SonicMaster519 2 года назад

      @@subhfathesubmarine961 Nevermind, I figured it out!

    • @sr.dudu1233
      @sr.dudu1233 2 года назад

      bro mine was looping it was the same problem bc of you i could continue the series tysm

  • @Kolby13
    @Kolby13 5 месяцев назад +3

    I got the error: ServerScriptService.Main.Tower:53: ServerScriptService.Main.Tower:15: attempt to index nil with 'HumanoidRootPart' I don't know how to fix this...

    • @GrimGamingTheOfficial
      @GrimGamingTheOfficial 5 месяцев назад

      does your tower have a humanoid root part?

    • @VitorMaIuquinho
      @VitorMaIuquinho 5 месяцев назад

      ​@@GrimGamingTheOfficialim having the same issue here and it does

    • @GrimGamingTheOfficial
      @GrimGamingTheOfficial 5 месяцев назад

      Then I don’t know honestly just run it through to chatgpt and see what you get Edit: changed g eat to get

    • @lanzaguisantes-medieval-11
      @lanzaguisantes-medieval-11 2 месяца назад

      same

    • @sir_spud
      @sir_spud 20 дней назад +1

      I know it's a late reply, but on line 28, at least for me, there is the "local target = FindNearestTarget(newTower)", make sure there is a newTower inside theround brackets after FindNearestTarget

  • @Just.Y0urL0calN0ob
    @Just.Y0urL0calN0ob 2 года назад +1

    Hey gnomecode, I've got a video idea for this series. Adding custom health bars above the enemies. You should also make a currency needed to buy towers which you can get from killing enemies. Harder ones drop more. You should also make a base which you have to defend which also has a custom health bar and a screen gui. Keep up the good work and helpful videos.

    • @b_forbunnyyt1283
      @b_forbunnyyt1283 2 года назад +1

      he’s obviously going to teach us about the hp bar billboard, ingame cash, and all of that stuff, even tho it’s very simple cause it’s the fundamentals of a td game.

    • @Just.Y0urL0calN0ob
      @Just.Y0urL0calN0ob 2 года назад

      Fair enough

    • @Just.Y0urL0calN0ob
      @Just.Y0urL0calN0ob 2 года назад

      @@b_forbunnyyt1283 even above the enemies?

    • @b_forbunnyyt1283
      @b_forbunnyyt1283 2 года назад

      @@Just.Y0urL0calN0obwell it’s very easy just search up a health bar tutorial and put it in the enemy

    • @Just.Y0urL0calN0ob
      @Just.Y0urL0calN0ob 2 года назад

      True

  • @jqy_j23
    @jqy_j23 2 года назад

    happy new year! thanks for all the great tower defense tutorials!

  • @candykid44
    @candykid44 2 года назад +4

    Hey Gnome, currently I am having some problems with the bodygyro, whenever the tower is placed it starts floating and is basically flying about half a stud above the baseplate, help please xD
    I figured out the problem sort of, basically bodygyro doesnt work on anchored parts. So I unanchored the humanoidrootpart because it had a bodygyro, but then it made the tower float because there were no anchored parts in the tower. Gnome, did you anchor your humanoidrootpart in this video?
    EDIT: I FIXED IT HOORAY! It was because of the hipheight on my tower was making it float. I changed it back to 0 and just set the part of the code where it references and uses hipheight to just 1 stud.

    • @HotMess_
      @HotMess_ 2 года назад +2

      Try rewatching the "placing towers" video.

    • @candykid44
      @candykid44 2 года назад +1

      @@HotMess_but it happened after i added the bodygyro lol

    • @candykid44
      @candykid44 2 года назад +1

      @@HotMess_ ok so here is the problem i figured out, bodygyro doesnt work on anchored parts so i unanchored the humanoidrootpart, but when i do that it makes the tower float because there is no anchored part in that tower. do you know if gnome had his hrp anchored in this video?

    • @GamrGuyReal
      @GamrGuyReal 2 года назад

      @@candykid44 change hipheight

    • @candykid44
      @candykid44 2 года назад +1

      @@GamrGuyReal if you press "read more" it tells you that I found out and fixed this problem 3 days ago, thanks anyways :)

  • @dogfish.dogfish
    @dogfish.dogfish 2 года назад +4

    22:19 hello great gnomecode sir
    im using a custom rigged tower for this and it wont load the attack anim when it actually attacks it just continues the idle anim
    if you know how to fix this please tell me
    thank you

    • @ThatDemonicGamer1
      @ThatDemonicGamer1 2 года назад +1

      I had something similar but instead of it not playing the attack animation it would play the attack animation and not stop or go back to the idle animation and I saw what he did to fix it in the video and I did that but it still doesn't work

    • @Tigrannasouras
      @Tigrannasouras 2 года назад

      @@ThatDemonicGamer1 were u able to fix it?

  • @blackknight3689
    @blackknight3689 2 года назад

    Happy New Year! That's the best tutorial ever!

  • @JEREMY-92k
    @JEREMY-92k Месяц назад

    making this made me think of a cool name for the game :) Gnome Tower Defense

  • @moxie847
    @moxie847 Год назад

    I had this cool idea to actually make mobs attack the towers as they pass by, becasue imo it feels unrealistic when a mob just passes by our tower while taking damage, so in my game I also added "healer" towers, which heal our towers damaged by mobs

    • @FrowningWind213
      @FrowningWind213 Год назад

      tell me if you release game cuz that sounds cool

  • @squigglesz
    @squigglesz 7 месяцев назад +1

    HOLY THIS WORKS GREAT!!!!!!!!!!

  • @libertysworldOnRoblox
    @libertysworldOnRoblox Год назад +38

    for bodygyro, ignore all lines just place the following newTower.PrimaryPart.CFrame = CFrame.new(newTower.PrimaryPart.Position, target.HumanoidRootPart.Position) above the line animateTowerEvent:FireAllClients(newTower, "Attack")

  • @jaikwss1848
    @jaikwss1848 2 года назад +2

    thanks so much! I like tower defence tutorials!

  • @parakeetplus4493
    @parakeetplus4493 2 года назад +1

    Love you vids especially your tutorials and I really like this tower defense series I how you post the game when its done I'm sure I'll have a good time.

  • @spirit_fv
    @spirit_fv 2 года назад +1

    WOW,I FOUND THIS FAST 33 SECONDS love your videos

  • @ScorchingRainbow
    @ScorchingRainbow Месяц назад

    Note if your tower is attack inverse just rotate the humanoidrootpart so it faces the correct way

  • @arubi04
    @arubi04 2 года назад +1

    Yooo, new video!! Thank you GnomeCode!
    (Also First lol)

  • @henrythehyperrips
    @henrythehyperrips 2 года назад

    Thank you SO much for tis series! Not only can you add on more at the end, it is just so helpful because you aren’t just telling us to do but actually teaching us about things AND every time you do make a mistake (which is rare) you can always help us and are always replying to problems we have! Also you must have worked so hard finding out thus script and I just want to thank you for all of the episodes that you have done, you are a GREAT scripting youtuber!

  • @reepercoming5248
    @reepercoming5248 Год назад +1

    if anyone is having trouble with their custom towers floating the / 2 is for r15 and + 1 is for r6

    • @heliumhater7
      @heliumhater7 Год назад

      for me its +1.5

    • @asdasdasdf1
      @asdasdasdf1 Год назад

      by any chance do you know if the code in the video for the idle (and probably attacking animation too, i just haven't got that far as the idle animation isnt working for me) is different for r6? or is it just the model i used for some reason (im pretty sure it has everything i need)
      i'm getting no errors in the output, and no warnings for the animation not existing

  • @ralone4016
    @ralone4016 2 года назад

    Cool new video but I think my brain is so small for it:)(Happy new year!🎉)

  • @bartoszpudelski5239
    @bartoszpudelski5239 2 года назад +2

    suggestions: add tower upgrades, more types of towers ( splash damage ( explosion ), damage over time ( fire or poison ), slowing ( ice or electricity ( slowing means that it slows down or stops an enemy from moving for a period of time ) ) multi-target ( one attack can hit multiple enemies without using splash damage ), spawner ( can spawn units that walk along the track from your base. Each unit has Health. If an unit collides with an enemy, the unit reduces the enemy's health by its health and disapears. If the unit has more health than the enemy, the unit's health reduces by the amount of health the enemy had before the unit has collided with it, and the unit keeps walking on the track. ), support ( can give buffs to towers in it's range) ) multiple modes ( the players will have around 30 seconds to pick a mode before the round starts ) major boss ( a boss that will stun, have a health bar, and will come on the last wave of the mode ) stuns ( some zombies ( mostly major bosses ) will have special abilities that can create special effects ( shockwave for example ) or can use special tools ( for example swords ) that can stun towers uppon contact ) necromancer ( aka zombie that can summon other sombies at it's position ) carrier ( aka zombie that uppon death will spawn multiple other zombies at it's position)

    • @NeoETM
      @NeoETM 2 года назад +1

      Hmmm. I wonder what this reminds me of.

    • @safgsafj2685
      @safgsafj2685 2 года назад +1

      @@NeoETM i wonder......

    • @cybermanextreme7869
      @cybermanextreme7869 2 года назад +1

      @@safgsafj2685 yeah i wonder...

    • @bitedacooki823
      @bitedacooki823 2 года назад

      hmmmm....

    • @mathoe123
      @mathoe123 Год назад

      @@NeoETM yeah i wonder what it's familiar.

  • @akiprox7
    @akiprox7 2 года назад +1

    Amazing series!

  • @unbornshaitan
    @unbornshaitan 2 года назад

    Happy new year too all! We've all made great accomplishments this year I bet. Next year will be even better

  • @ScorchingRainbow
    @ScorchingRainbow 11 месяцев назад

    if the attack animation keeps playing even when you fix it make sure you turned off loop in animation itself then re-save and paste the ID

  • @nashayndagoat
    @nashayndagoat 2 года назад +1

    I love you bro.

  • @squigglesz
    @squigglesz 7 месяцев назад +1

    Just asking can you keep the placeholder anim? I actually like it more

  • @bloxer_7696
    @bloxer_7696 2 года назад +1

    Amazing tutorial once again

  • @Nikolaus_Games_YT
    @Nikolaus_Games_YT 19 дней назад

    Thank you, now it's works!

  • @Pyr0Blox1
    @Pyr0Blox1 2 года назад

    Amazing Work GnomeCode One day You will have 1m subscribers before we all know it

  • @paticat79
    @paticat79 Год назад +1

    make sure you closed looping while making attack animation

    • @questmaker
      @questmaker Год назад

      I did that and set it to action but it won't work

    • @BloonPlays
      @BloonPlays 10 месяцев назад

      @@questmakerdid u ever fix it?

    • @pandagamingtv0
      @pandagamingtv0 5 месяцев назад

      how i close looping?

  • @dabstablook7774
    @dabstablook7774 2 года назад +1

    Keep up the great work !

  • @omagus9834
    @omagus9834 2 года назад

    Happy new year

  • @robloxiancuber3119
    @robloxiancuber3119 2 года назад

    Maybe the best TDS tutorial in the world i guess

  • @KRAIBIK
    @KRAIBIK 4 дня назад +1

    my animators don't work

  • @tellymage
    @tellymage 2 года назад

    love this series, saving my spot, 6:00!

  • @meneme361
    @meneme361 2 года назад

    Happy new year!

  • @ChristopherThePiss
    @ChristopherThePiss 2 года назад

    Happy new year mate. I shall see you next game night. Although it may be a problem getting the links seeing as I left discord

    • @GnomeCode
      @GnomeCode  2 года назад

      We'll see how it goes!

  • @DOACPOGDIARYFROMOGCURSED
    @DOACPOGDIARYFROMOGCURSED 2 года назад

    Oml this helped so much

  • @Zeezonotbald
    @Zeezonotbald 2 года назад

    saving my spot at 19:53 and btw nice work!

  • @Leiaazz
    @Leiaazz 2 года назад

    Happy new year! :D

  • @Reytinaz
    @Reytinaz 2 года назад

    Hello i second. Your videos are nice and cool and great and good and awesome!!! Congrats with 50K subs!

  • @akiisnoob
    @akiisnoob 2 года назад

    Thank you man now I can make my friend dream happen by making him his dream game

  • @warawutcharoenthai9529
    @warawutcharoenthai9529 2 года назад

    This is amazing ! Keep going i wanna see untill last episode!

  • @Gumbibull
    @Gumbibull 2 года назад

    Your better than the other ones

  • @eaglebutter1
    @eaglebutter1 Год назад +5

    Guys since the body gyro is outdated,just delete all body gyros and make the code for facing in attack
    Local look = lookat(newTower.HumanoidRootPart.position, (target.HumanoidRootPart.position.x, newTower.HumanoidRootPart.position.y, target.HumanoidRootPart.position.z)
    NewTower.HumanoidRootPart.CFrame = look

    • @J4narC
      @J4narC Год назад +1

      so where am i suppost to put this script?

    • @mathoe123
      @mathoe123 Год назад

      @@J4narC in tower module, attack function

    • @ThatOneGu123
      @ThatOneGu123 Год назад

      lookat is underlined i have no idea what to do

    • @ThatOneGu123
      @ThatOneGu123 Год назад

      (and im late)

    • @mathoe123
      @mathoe123 Год назад

      @@ThatOneGu123 yep, you are 5 months late my guy

  • @dominicimposterwinfree244
    @dominicimposterwinfree244 2 года назад

    I knew it I knew it is gonna be about the animation on the towers

  • @Nojg_
    @Nojg_ 2 года назад

    you are insane man your voice is so relaxing and you explain very well (im not english and sometimes i don't understand but with you i always understand) you are the best roblox studio channel on youtube !!!! continue like this we all love you !!

  • @EplcXz
    @EplcXz 2 года назад

    You Too cool And Happy New year

  • @wallstreetplays
    @wallstreetplays 2 года назад

    Oh yeah....
    Its all coming together.