FINALLY A TUTORIAL, I am a tower defense veteran and I have played nearly all TD games I really wanted to make one myself because I've seen all the bad things about most TD games, unfortunately I do not have a pc. oh also here are the things I want tutorials about: 1. tower cost, placing, and upgrades 2. money each wave and each enemy killed 3. shop to unlock towers and be able to use them 4. when losing/winning, gives coins to purchase towers in the shop
DUDE YOU DONT KNOW HOW MUCH THIS IS GANNA HELP ME. I have been wanting to make a tower defense game and I'm pretty new to studio. And this Playlist will help me so much
I’m probably not gonna make a game like this but I just love seeing and learning how you code. It really helps me get a better knowledge of certain things! Thanks!
I encountered a weird issue with the code, but I found a solution. In my case, I followed the exact code but the zombie just walked in a straight line endlessly until they fell off the map. I fixed this by making the waypoint a string like so: local zombie = script.Parent local humanoid = zombie.Humanoid local waypoints = workspace.Waypoints for waypoint = 1, #waypoints:GetChildren() do local goTo = tostring(waypoint) humanoid:MoveTo(waypoints[goTo].Position) humanoid.MoveToFinished:Wait() end It was a very weird problem and I doubt anybody else had this problem, but I hope I helped!
The second I saw this I was so happy as I've been struggling to make a TD game. Tysm Gnome! I've learnt so much about path finding and coding just because of this! Once again, thank you.
Same for me dude, I haven’t scripted in a while so my scripting is rusty and I forgot some stuff so I looked on yt for tutorials and all of them are free models with viruses
I've been doing this tutorial for the past week, here's what i've learned. If your zombie isn't moving, maybe it's anchored. Make the paths short, it will work. If the paths are long then the zombie will try to skip the long paths, we don't want this to happen so place another waypoint where the zombie skipped it.
You know... when you see something that`s high quality and of high value you should always try and support it in any way you can. I followed and completed all the steps of this tutorial and I can say with 100% certainty that it gave me a solid foundation to create any kind of game in Roblox I can think of and wish to create. People take for granted things that are given away so freely and in such a non-self important way, but I wish more people would support such content since it can even change lives I say this because I worked through this series and moved on to teach my 9 year old son and he is not completly into roblox development. I know in the future he will thank me since I am his dad and supported him... but if it wasnt for this course there is no way I would be able to teach him. The tutorial is thorough and plainly taught. The BEST Roblox development tutorial I have come across by far! All this is to say, thank you and you have a supporter for life!
Thank you, this means a lot. It's really great to hear people are getting the most out of these videos. I wish you and your son all the best for the future.
@@GnomeCode I love what your doing but im stuck on making the zombie move i have the script right with the waypoints but the zombie wont move do know if u can help me fix it?
@@GnomeCode gnome code, my zombie isnt moving when I entered the exact same code. Do we anchor the zombie though and all the other parts? Because im confused
@@filltobe Try this (paste it in the script the zombie s inside local zombie = script.Parent local Waypoints = script.Parent.Parent.Waypoints for Waypoint=1, #Waypoints:GetChildren() do zombie.Humanoid:MoveTo(Waypoints[Waypoint].Position) zombie.Humanoid.MoveToFinished:Wait() end
@@Bread8468 local zombie = script.Parent local Waypoints = script.Parent.Parent.Waypoints for Waypoint=1, #Waypoints:GetChildren() do zombie.Humanoid:MoveTo(Waypoints[Waypoint].Position) zombie.Humanoid.MoveToFinished:Wait() end
Hello everyone reading this, this is an awesome tutorial having a lot of features and was a very fun tutorial might of taken a while to get the game done but was definitely worth it! This is one of the only tutorials that actually worked for me or maybe that just because my spelling sucks 😅 but all of the tutorials work and they are awesome. Good luck to you all making a tower defense game!
@@GnomeCode when I was trying to make him move to all the waypoints it wasn’t working really you were just standing in one place doing nothing btw it was my avatar
Wow, you actually made the first TD tutorial that does 1 thing at a time that I've seen. This tutorial really helped a lot with learning to make an NPC to follow a path for a tds game! Can't wait for part 4! edit: thanks for the likes guys, even tho some are just corrections. its a letter difference, ok? this is useless now
--The code: local zombie = script.Parent local waypoints = workspace.WayPoints for waypoint = 1, #waypoints:GetChildren() do zombie.Humanoid:MoveTo(waypoints[waypoint].position) zombie.Humanoid.MoveToFinished:Wait() end --Thank you. because of you i was able to make this first epesode myself(i have like 5 days expereince)
An actual good tutorial that doesnt just tell u what to write but things you want out like the output to see your mistakes. Gnome also create games I want to make, and their so clear. Your a legend Gnome. Best tutorials.
Question, I building a tower deffence game with 3 different paths (Left Middle and Right) and I name them all something different. For Orginazation I had started every waypoint and folder with "Right", so how much of the script should I change? If its a bit confusing here is everything: "RightWaypoints" is the first folder "RightPath" is the second folder "Right1", "Right2", "Right3", "Right4", and "Right5" were my waypoints (If Important Right5 was before called RightEnd)
@@orkogamer5102 I don't think it's that much harder, the only hard part is pretty much adjusting it to be capable of multiple paths, and it isn't that hard to do.
you are very specific with details in the video too which makes it very clear as to which parts of the script are related and how they work, helps alot, same with the parts that you zoom on to show which things to press or insert.
@@GnomeCode Hi I really like how you explained it but it is not working for me. Can you send me the script? It would help a lot as I really want to make a tower defense game and you are the only person who does it well.
If yall are coming back to this video now because ur mobs are like skipping the waypoints because they are slow, I have a solution and all you need to do is instead of making ur paths way shorter... Just place more waypoints in the straight long paths! and the other paths if you want to. Thank you :)) love you and a happy new year!!!!!
or you can just code it like this and it wont skip waypoints local pirate = script.Parent local waypoints = workspace.Waypoints for waypoint=1, #waypoints:GetChildren() do repeat pirate.Humanoid:MoveTo(waypoints[waypoint].Position) until pirate.Humanoid.MoveToFinished:wait() end
if your model is not moving, and its custom, check if your humanoidrootpart has been anchored, if you have it unanchored and it still doesnt work, try to see if the humanoidrootpart is the primary part in your model.
my code wont work because Waypoints is not a valid member of Workspace "Workspace" (i've never coded so idk what that means at all) and my zombie wont move at all even when its unanchored
I'm a Korean. I wanted to make a tower defense game, so I looked for a video, but it wasn't the game I wanted to make, and there were errors so I couldn't make the game, but I made the game after watching this video, and it was perfect with no errors! thank you.
hello gnome code! I'm making a td game myself, and have done the most important stuff, ex. char movement, tower placing and etc, but i have been strugglin to make towers attack the first enemy in the path! ive tried arranging them on when they'd spawn that'll not work since different zombies have different speeds, so i will like to follow this tutorial and learn stuff to make my td game more effecient
I'm no giga expert scripter but you can probably make a value in the zombie that adds 1 to itself every .5/zombie speed (for the speed zombie for example 2) seconds or so and attack the zombie that has the highest value and is in range of the towers
Ok I know no one would read this but I thought the code was outdated but the reason it wont work because I named each waypoints "Waypoints[number]" instead of just a number
if you found out how this works, i need to know! i messed up somewhere and i dont know how to make him move! ive even tried making him just move in a straight line, but i can't figure it out! i know it does have something to do with my variables though, can you help me?
By far the best scripting tutorial RUclipsr ever, I actully can learn instead of being told what to do and if I do it wrong I would know how to fix it.
At first i was like (why isint it working?) So i checked the video and my script and i realised i just accidentally capatilezed a few words! also this guy is awesome! keep up the good work! :D
hey yall here a script if the pathfinding doesn't work at 7:35 local zombie = script.Parent local waypoints = workspace.Waypoints for _, waypoint in pairs(waypoints:GetChildren()) do zombie.Humanoid:MoveTo(waypoint.Position) zombie.Humanoid.MoveToFinished:Wait() end happy to help 😊
i've been having an issue with the pathfinding. when the NPC moves to a waypoint, it doesn't move all the way to the center, which offsets the enemy from the path. if anyone could help me, i would VERY much appreciate it, as i have looked for LITERAL HOURS through the devforums and online trying to FIND A STUPID SOLUTION. so yeah, any help is appreciated.
If you have a long straight, then it would be a good idea to put two waypoints on it. My zombie just froze on the way to the final one, and adding an extra waypoint on the way down that straight path fixed it.
Yo star. Do you think you can help me with the code because mine is not moving at all. I’m not sure what I’m doing wrong but this is the code I put in local zombie = script.Parent local waypoints = workspace.waypoints for waypoint=1 #waypoints:GetChildren() do zombie.Humanoid:MoveTo(waypoints[waypoint].Position) zombie.Humanoid.MoveToFinished:wait() end I can to you becuase you were the latest comment but if you think you can help pls help. If you can’t then I’ll try to figure it out I’ll let you know if I end up figuring it out myself
@@Tritanicle local zombie = script.Parent local waypoints = workspace.Waypoints for waypoint=1, #waypoints:GetChildren() do zombie.Humanoid:MoveTo(waypoints[waypoint].position) zombie.Humanoid.MoveToFinished:Wait() end
Hey I'm glad you're doing this :)), I've watched a bunch of your other videos and you've been a major influence in me wanting to start making games now! I'm so excited to learn more.
thank you! i just started working on this td game, and im hoping this will be my start to it. keep up the good work! easily my favorite scripting youtuber.
i got another problem :/ so i made the enemys smaller and slower (changed it to 5) at a certain point they just skip the end of the track and try to go to the next point, but when i change the speed to 10, it works perfectly fine
alright I spent ages trying to figure this out by myself. so basically, movetofinished can return false or true, true if it successfully makes it to the point and false if it does not. So what I did was ``` local function MoveToFinished(humanoid,position) local Timeout = true local event = humanoid.MoveToFinished:Connect(function(successful) if not successful then humanoid:MoveTo(position) return end if successful then Timeout=false end end) repeat task.wait(.25) until Timeout==false event:Disconnect() task.wait(.1) return end ``` we are not done yet. now that code above gooes outside any code, so just put it on the first line basically. and then you know wher eyou put humanoid.movetofinished:Wait() replace it with ``` MoveToFinished(*humanoid*,*waypoints*[tostring(index)].Position) ``` you see the humanoid after the first bracket? you need to say local humanoid = mob.Humanoid -- or wherever your humanoid is see the waypoints?. yeah you need to copy the code from the loop as shown in the video :D np i went into detail because i don't know if you know scripting much
Hey, I wanted to ask, so I did everything like you and when I started testing, zombie wasn't moving, how to fix that? I checked your script like 5 times and I didn’t find any difference, what did I really do wrong?
Dawg, I remember doing this tutorial 2 years ago and had no idea of what anything did, but now that I'm somewhat of an advanced scripter, I understand all of it.
the code basicly looks in the folder waypoints and looks at the first object inside the folder since it cant read its position its likely u havent placed it anywhere or its an object that isnt placed on the map for example a script
The zombie script aint worked for me some months ago. But i retryed making the tower defense and your script actually works! I think it's because i typed something wrong and i had the outpot thing closed
One thing I noticed is that when the waypoints are too spaced out from eachother the zombies just break off towards the next one, is there anyway to fix this?
Hey! This video is very cool but I have one error: When I tried to make my own custom zombie, it just stands there. It is also not anchored and the script is correct What do I do in this situation?
@@shifter231 i also just realized that of you do multiple parts to make something, it won’t work. But if you have like a single part for a arm, a single part for the leg, etc, it would work. So if you make a “detailed” character with extra parts, it wouldn’t work.
Everytime I follow A tutorial, the code is outdated, but even two years later and this man has helped me more in the past 4 minutes than anyone else has in 30. Truly A legend. I also now understand The coding (slightly more) of Parents, Moving positions and what meshes actually are. Edit: I actually love you bro. I had a heart attack because it wouldnt go to the positions but then you had the same problem and fixed it lol
IF YOU'RE HAVING ISSUES WITH YOUR ZOMBIE MOVING, CHECK THIS! short version: just make sure to not put ur things in folders before ur told to check the parent, of where you're trying to move your zombie for me, i was trying to move my zombie to workspace.End.Position,
@@floopi3 check capital letters in the code, make sure you have all the right capital letters when referring to your mob, and make sure it has a humanoid thingy
pls can u make a video and tell me why isnt it moving? , also is it bcos that the waypoints from 1,2,3 etc is in the folder? , and also when should u put them in the folder?
I don't understand why my zombie doesn't go to the end if I followed the steps to the letter Now I realized you made a cut, I'm new to creating games in RE, so showing me the "ending" script would help me a lot. Thank you
I am also I having some trouble, my guy does not even start walking and my way points I set to collision off but I can stand on them? I don’t know how much I’m doing wrong but I can’t get anything to work. :(
Hello GnomeCode! I'm glad you are doing this series, as Tower Defense games have been a passion far before my Piggy obsession kicked in, lol Speaking of which, I wanted to ask you if you could make a video about your Teddy shopping system, that's been a slight concern with my game and I'd appreciate shop creating knowledge. :)
Yo dude i have a question what do i do when the enemy just goes in waypoint 1 and stay there? how do i fix also the enemy i made always look behind and walk on the first waypoint (nvm i managed to fix it by making 12 waypoints instead of 9)
Nice video Gnome! However, I’m struggling to loop the script on making the enemy go from one point to another. Do I copy and paste the process or what?
here's the script if anyone needs it: local zombie = script.Parent local waypoints = workspace.Waypoints for waypoint=1, #waypoints:GetChildren() do zombie.Humanoid:MoveTo(waypoints[waypoint].Position) zombie.Humanoid.MoveToFinished:Wait() end
-- Before using the script, change the mousy to the name of the character you want to use!! local Mousy = script.Parent local waypoints = workspace.Waypoints for waypoint=1, #waypoints:GetChildren() do Mousy.Humanoid:MoveTo(waypoints[waypoint].Position) Mousy.Humanoid.MoveToFinished:Wait() end
code if you guys want to do it: local zombie = script.Parent local waypoints = workspace.Waypoints for waypoint=1, #waypoints:GetChildren() do zombie.Humanoid:MoveTo(waypoints[waypoint].Position) zombie.Humanoid.MoveToFinished:Wait() end this helped me too much (if your not using a zombie then put the original name for the NPC who you want to script)
Guys, i need help, I write all scripts correct, but theres mistake and output write "WayPoints is not a valid member of Workspace " Workspace"" Help me 😢
FINALLY A TUTORIAL, I am a tower defense veteran and I have played nearly all TD games
I really wanted to make one myself because I've seen all the bad things about most TD games, unfortunately I do not have a pc.
oh also here are the things I want tutorials about:
1. tower cost, placing, and upgrades
2. money each wave and each enemy killed
3. shop to unlock towers and be able to use them
4. when losing/winning, gives coins to purchase towers in the shop
is there a link for your game?
I wanna try it for some reason
@@alicorn3924 Yeah if the game is out i would too want to play it
Unless I’m wrong but I think the commenter don’t have a game
@@Oppteekap Yes ik but just saying for the Future maybe
coding will be hard..........Goodluck! reply to me if you complete it I will happily play it :D
Even though I'm not interested in making a tower defense game, this has got some stuff that is going to be helpful to me as a developer
Exactly
the power of learning from similarities!
@@SuperJSM True very very TRUE🎉
YES
DUDE YOU DONT KNOW HOW MUCH THIS IS GANNA HELP ME. I have been wanting to make a tower defense game and I'm pretty new to studio. And this Playlist will help me so much
Good
Me too
Same
how is your progress so far?
we should make on tg
Me: Looks away for 1 second
GnomeCode: …And that is how you fully make the universe inside of Roblox Studio!
@@BlendaCat
@@hafikhaildwtf
Literally
FR
OMG THIS IS THE PART I WAS LOOKING FOR TO IMPROVE MY DEVELOPING, TYSSM I LEARNED SCRIPTING
Nice:D
Why does the script not work for me
@@steak9586Yeah why?
@@steak9586 its outdated
@@timeafelner8016 its outdated
I’m probably not gonna make a game like this but I just love seeing and learning how you code. It really helps me get a better knowledge of certain things! Thanks!
Thanks for the good vibes as always PineBlox!
@@GnomeCode so with this, your making it so we can make a tower defense game with working stuff like elevators
we can make a retro TDS?? :D
Are you still like Roblox
@@GnomeCode i watch your teddy devlogs just to see how you are doing
and sometimes i follow them to test things
@@propel3536 tbz system is far superior
Thanks man, this is the first tutorial on the game I've ever seen! Its like Inventing a entirely new thing, ya genius!
I don't think it works in 2024 tho :/
@Kyu3488 its working for me tho
Bruh this works 100%
@@ShriyansRepala mine only moves through 2 waypoints
mine only moves to the first
I encountered a weird issue with the code, but I found a solution. In my case, I followed the exact code but the zombie just walked in a straight line endlessly until they fell off the map. I fixed this by making the waypoint a string like so:
local zombie = script.Parent
local humanoid = zombie.Humanoid
local waypoints = workspace.Waypoints
for waypoint = 1, #waypoints:GetChildren() do
local goTo = tostring(waypoint)
humanoid:MoveTo(waypoints[goTo].Position)
humanoid.MoveToFinished:Wait()
end
It was a very weird problem and I doubt anybody else had this problem, but I hope I helped!
OMG TYSM!!
i copied the script it didnt work for me but i fixed it only writing Waypoints instead of waypoints lol
Thanks❤❤❤
ty, this worked out for me and made the pathfinding system work.
dude saved my life
The second I saw this I was so happy as I've been struggling to make a TD game. Tysm Gnome! I've learnt so much about path finding and coding just because of this! Once again, thank you.
Awesome, hope you enjoy the series!
Same for me dude, I haven’t scripted in a while so my scripting is rusty and I forgot some stuff so I looked on yt for tutorials and all of them are free models with viruses
@@GnomeCode pls episode 2
@@jordyissappig he just made the vid day ago, this takes times, wait in ur chair 3 - 9 days for the 2nd part
@@aok737 no
You are underrated, deserve more than a million congratulations, thanks for one more tutorial :)
Thank you for the good vibes!
@@GnomeCode r u working on part 4? i relly need it
That is so true
@@GnomeCode how do you turn can collide off for the zombie?
I have been following this series and I’m on tut #15 and everything have been working so far
How did u make the zombie move
I just followed what he did
@@lucasparakhoodi9239 code
@@lucasparakhoodi9239 idk
(pls help)
I've been doing this tutorial for the past week, here's what i've learned.
If your zombie isn't moving, maybe it's anchored.
Make the paths short, it will work. If the paths are long then the zombie will try to skip the long paths, we don't want this to happen so place another waypoint where the zombie skipped it.
You my friend are a G . thanks for being helpful
My zombie wasn’t moving while it was not anchored :(
same dude :(@@calebinfinityworld2664
@Hackerreports-pe2ll ur genius ty it finally worked
it only went to waypoint 1 and after it arrives at waypoint 1 my zombie doesnt move anymore???
@Hackerreports-pe2ll
This tutorial is so good explained! In 15 minutes with no knowledge I made a path and a zombie moving on the paths!
My zombie won’t move:(
@@ardentlorax0072 same
You know... when you see something that`s high quality and of high value you should always try and support it in any way you can. I followed and completed all the steps of this tutorial and I can say with 100% certainty that it gave me a solid foundation to create any kind of game in Roblox I can think of and wish to create.
People take for granted things that are given away so freely and in such a non-self important way, but I wish more people would support such content since it can even change lives
I say this because I worked through this series and moved on to teach my 9 year old son and he is not completly into roblox development. I know in the future he will thank me since I am his dad and supported him... but if it wasnt for this course there is no way I would be able to teach him.
The tutorial is thorough and plainly taught. The BEST Roblox development tutorial I have come across by far!
All this is to say, thank you and you have a supporter for life!
Thank you, this means a lot. It's really great to hear people are getting the most out of these videos. I wish you and your son all the best for the future.
@@GnomeCode I love what your doing but im stuck on making the zombie move i have the script right with the waypoints but the zombie wont move do know if u can help me fix it?
@@GnomeCode gnome code, my zombie isnt moving when I entered the exact same code. Do we anchor the zombie though and all the other parts? Because im confused
@@filltobe Try this
(paste it in the script the zombie s inside
local zombie = script.Parent
local Waypoints = script.Parent.Parent.Waypoints
for Waypoint=1, #Waypoints:GetChildren() do
zombie.Humanoid:MoveTo(Waypoints[Waypoint].Position)
zombie.Humanoid.MoveToFinished:Wait()
end
@@Bread8468 local zombie = script.Parent
local Waypoints = script.Parent.Parent.Waypoints
for Waypoint=1, #Waypoints:GetChildren() do
zombie.Humanoid:MoveTo(Waypoints[Waypoint].Position)
zombie.Humanoid.MoveToFinished:Wait()
end
Hello everyone reading this, this is an awesome tutorial having a lot of features and was a very fun tutorial might of taken a while to get the game done but was definitely worth it! This is one of the only tutorials that actually worked for me or maybe that just because my spelling sucks 😅 but all of the tutorials work and they are awesome. Good luck to you all making a tower defense game!
I used to never believe in the gnomes thought they where dumb but now I know there power. I myself am now apart of the gnomes.
THEIR power actualy* **** ** * * 🤓🤓🤓
FINALLY A GOOD DEVELOPER WHO GO STRAIGHT TO THE POINT
You and Alvin got me into scripting I wanna say thank you 🙏🏼
That's great to hear, best of luck with your future devving
@@GnomeCodeuhh gnome i have a problem
My zombie desent even move
@@GnomeCode when I was trying to make him move to all the waypoints it wasn’t working really you were just standing in one place doing nothing btw it was my avatar
Pls help me I don’t know how to do the part where the zombie follows each path block 6:35
A quick shortcut for putting all the parts into a folder is Shift + F
or just hold right click and like grab them all and hold to the folder
@ufyaabflame2270 but its pretty satisfying
@UFYAAB flame It's called a key-bind.
Wow, you actually made the first TD tutorial that does 1 thing at a time that I've seen. This tutorial really helped a lot with learning to make an NPC to follow a path for a tds game! Can't wait for part 4!
edit: thanks for the likes guys, even tho some are just corrections. its a letter difference, ok? this is useless now
Glad it helped!
I will leave a game now..... I mean later
Its tb tutorial
Anyone see the tutorials that are kits there mainly viruses and i just wanna script
@@Brroo you mean tower defense tutorial?
this popped in my recommended I haven't watched the video yet but ik it's gonna be a good tutorial bc it's from gnome
It didn't work his script is not working is there something I'm missing
i eat gnomes
Same @benjamain6523
@@benjamin6523it works fine what happened?
@@benjamin6523Ik why it's because this vid was made a year or 2 ago and Roblox studio has eveloved
--The code:
local zombie = script.Parent
local waypoints = workspace.WayPoints
for waypoint = 1, #waypoints:GetChildren() do
zombie.Humanoid:MoveTo(waypoints[waypoint].position)
zombie.Humanoid.MoveToFinished:Wait()
end
--Thank you. because of you i was able to make this first epesode myself(i have like 5 days expereince)
thanks
An actual good tutorial that doesnt just tell u what to write but things you want out like the output to see your mistakes.
Gnome also create games I want to make, and their so clear. Your a legend Gnome. Best tutorials.
theres a error can u help ?
@@Hancemayapu why would he help
lol
@@placeholerwav I legit tried everything to fix error and didnt work
@@CheekyMauricio well then you made a mistake, its not "fake" or "bad" tutorial its good.
It's all thanks to you that i have been able to make a tower defence game! Thank You so much mr.GnomeCode!
what's it called? (I'm also making one just not going to well I just want to support creators
Question, I building a tower deffence game with 3 different paths (Left Middle and Right) and I name them all something different. For Orginazation I had started every waypoint and folder with "Right", so how much of the script should I change? If its a bit confusing here is everything: "RightWaypoints" is the first folder "RightPath" is the second folder "Right1", "Right2", "Right3", "Right4", and "Right5" were my waypoints (If Important Right5 was before called RightEnd)
3 paths may will be hard for you, try 2 paths and sorry but I don't know what script to use
@@orkogamer5102 I don't think it's that much harder, the only hard part is pretty much adjusting it to be capable of multiple paths, and it isn't that hard to do.
defense*
@@RipniumArchivepeople write defense as defence
beautiful! finished step 1, moving on! very simple and easy to learn thanks to this channel!
you are very specific with details in the video too which makes it very clear as to which parts of the script are related and how they work, helps alot, same with the parts that you zoom on to show which things to press or insert.
Glad to hear you found it helpful!
@@GnomeCode Hi I really like how you explained it but it is not working for me. Can you send me the script? It would help a lot as I really want to make a tower defense game and you are the only person who does it well.
fake@@GnomeCode
@@GnomeCodePLS MAKE A NEW SERIES
Not working for me either.... The zombie is going to the next waypoint a few studs before the first one
If yall are coming back to this video now because ur mobs are like skipping the waypoints because they are slow, I have a solution and all you need to do is instead of making ur paths way shorter... Just place more waypoints in the straight long paths! and the other paths if you want to. Thank you :)) love you and a happy new year!!!!!
your the goat
or you can just code it like this and it wont skip waypoints
local pirate = script.Parent
local waypoints = workspace.Waypoints
for waypoint=1, #waypoints:GetChildren() do
repeat
pirate.Humanoid:MoveTo(waypoints[waypoint].Position)
until pirate.Humanoid.MoveToFinished:wait()
end
Honestly mate, your the best roblox studio tutorial maker ever bro. You have inspired me to make my own games and thanks so much :)
yo my zombie is not walking and i dont know why i did everything like in the video do you know why it doesnt work T-T
if your model is not moving, and its custom, check if your humanoidrootpart has been anchored, if you have it unanchored and it still doesnt work, try to see if the humanoidrootpart is the primary part in your model.
then what? i saw that it its a primary part
it doesn't workstill
my code wont work because Waypoints is not a valid member of Workspace "Workspace" (i've never coded so idk what that means at all) and my zombie wont move at all even when its unanchored
I'm a Korean. I wanted to make a tower defense game, so I looked for a video, but it wasn't the game I wanted to make, and there were errors so I couldn't make the game, but I made the game after watching this video, and it was perfect with no errors! thank you.
It is a long series so good luck
for anyone in 2024 or 2025 this vid is useless it expired😢
@@ImOsu--FF2 The scripts are not outdated, i finished scripting few weeks ago
It still isnt working
안녕하세요 저도 한국인입니다.
Might need this video to make a pre-release version of "DD | IC:TD" :d (imma save this playlist video)
hello gnome code! I'm making a td game myself, and have done the most important stuff, ex. char movement, tower placing and etc, but i have been strugglin to make towers attack the first enemy in the path! ive tried arranging them on when they'd spawn that'll not work since different zombies have different speeds, so i will like to follow this tutorial and learn stuff to make my td game more effecient
Name?
Gabriel's tower defense, its a test game and not the official one, the official one uses humanoids instead of cubes
Ok thanks
I'm no giga expert scripter but you can probably make a value in the zombie that adds 1 to itself every .5/zombie speed (for the speed zombie for example 2) seconds or so and attack the zombie that has the highest value and is in range of the towers
hope it works.
Ok I know no one would read this but I thought the code was outdated but the reason it wont work because I named each waypoints "Waypoints[number]" instead of just a number
wow! I love this series! you are incredible gnomecode
if you found out how this works, i need to know! i messed up somewhere and i dont know how to make him move! ive even tried making him just move in a straight line, but i can't figure it out! i know it does have something to do with my variables though, can you help me?
@@OnePunchEnjoyer the code of the zombie?
make sure everything is named right, and make sure your code has been copied correctly
@@Minequacker i got it! im on the 3rd episode by now
@@OnePunchEnjoyer yay! :D keep going, and dont give up!
Thank you so much. I've been planing a TD project on Roblox, and I didn't know where to start with scripting. I owe you one, man!
my slime rancher brother hello
By far the best scripting tutorial RUclipsr ever, I actully can learn instead of being told what to do and if I do it wrong I would know how to fix it.
This looks like it’s gonna be a cool series. I think I’ll try it out
2:32 the npc finally used logic
Your tutorials are always the best! Keep up your amazing work, and your future projects!
first reply :>
and final :d@@SpringAppl
@@Sonsuz-Oyun BOI did you really think
@@Jay-qd7ib im the final
worst**
At first i was like (why isint it working?) So i checked the video and my script and i realised i just accidentally capatilezed a few words! also this guy is awesome! keep up the good work! :D
hey yall here a script if the pathfinding doesn't work at 7:35
local zombie = script.Parent
local waypoints = workspace.Waypoints
for _, waypoint in pairs(waypoints:GetChildren()) do
zombie.Humanoid:MoveTo(waypoint.Position)
zombie.Humanoid.MoveToFinished:Wait()
end
happy to help 😊
Alt account here yes this is all correct it works it makes the zombie move
thanks man
thanks for help!
No worries yall!
@@real_viper_tf2 Could you help me in the second video is that the zombies do not spawn
Glad you started a how-to series! I found you from the morphing video and I'm so glad I subscribed
Glad to have you here
@@GnomeCodehey man, please please answer me. My zombie will not move and idk why i did everything kike u saud
same, but it might be because I'm not using a zombie. @@thatonekittykat
You mean like and said
@@thatonekittykat same
This is an awesome video! Great for beginners and it is helping to introduce me into creating a game of my own. Thank you!
Yes, agreed
I'm using it for the path finding script.... Very helpful.
Not really did evrything right still won't work
@@Tank_66 same
Mine never does work I did everything but no
same my zombie stops at the second part
Guys I would recommend this you just have to listen to it closely (it works)
i've been having an issue with the pathfinding. when the NPC moves to a waypoint, it doesn't move all the way to the center, which offsets the enemy from the path. if anyone could help me, i would VERY much appreciate it, as i have looked for LITERAL HOURS through the devforums and online trying to FIND A STUPID SOLUTION. so yeah, any help is appreciated.
My doesn’t even move
same bro this is exactly whats happening to me
maybe for the classic baseplate it works? idk im new
same mine dosent even move
i have that problom
I remember watching your first coding video for teddy and only having around 3000 subs. You've came a long way.
Omg thank you so much. This helped me a lot with my tower defense game i'm making with my friends! This deserves a subscribe
What’s the game name?
Thank you for this, I am making my 2nd tower defense game rn bc my first one didn't work out to well. So thanks for this series.
Man, you are helping my team really much! Thanks man! Love your videos!
to be clear, i am the programmer
my friend (a part of my team) is THE GOAT at making the towers
uhm? the scripts don't even work anymore
@@Robserobtor i know.. sadly
@@Robserobtor all it needs is some adjustments to keep it up to date
If you have a long straight, then it would be a good idea to put two waypoints on it. My zombie just froze on the way to the final one, and adding an extra waypoint on the way down that straight path fixed it.
thx mate
thanks
Yo star. Do you think you can help me with the code because mine is not moving at all. I’m not sure what I’m doing wrong but this is the code I put in
local zombie = script.Parent
local waypoints = workspace.waypoints
for waypoint=1 #waypoints:GetChildren() do
zombie.Humanoid:MoveTo(waypoints[waypoint].Position)
zombie.Humanoid.MoveToFinished:wait()
end
I can to you becuase you were the latest comment but if you think you can help pls help. If you can’t then I’ll try to figure it out I’ll let you know if I end up figuring it out myself
workspace.Waypoints*
@@Tritanicle local zombie = script.Parent
local waypoints = workspace.Waypoints
for waypoint=1, #waypoints:GetChildren() do
zombie.Humanoid:MoveTo(waypoints[waypoint].position)
zombie.Humanoid.MoveToFinished:Wait()
end
Hey I'm glad you're doing this :)), I've watched a bunch of your other videos and you've been a major influence in me wanting to start making games now! I'm so excited to learn more.
Awesome! Thank you!
I need help . My zombie is not walking and i make script correct and the zombie not walk for the waypoints
@@noobz7551 Same issue here i really need help
@@noobz7551 hey, maybe because you are using a different zombie and it doesn’t have a humanoid? Or idk
@@Fletch12345 I have the same thing even tho I am using original drooling zombie
I'm just making a game from your tutorial! thanks for letting all us know how to make an tower defense
how did you make it work It didn't work for me
thank you! i just started working on this td game, and im hoping this will be my start to it. keep up the good work! easily my favorite scripting youtuber.
Wonder how it’s doing.
7:16 u can see he added smthing in replicated storage off camera
i got another problem :/ so i made the enemys smaller and slower (changed it to 5) at a certain point they just skip the end of the track and try to go to the next point, but when i change the speed to 10, it works perfectly fine
alright I spent ages trying to figure this out by myself. so basically, movetofinished can return false or true, true if it successfully makes it to the point and false if it does not. So what I did was
```
local function MoveToFinished(humanoid,position)
local Timeout = true
local event = humanoid.MoveToFinished:Connect(function(successful) if not successful then humanoid:MoveTo(position) return end if successful then Timeout=false end end)
repeat task.wait(.25) until Timeout==false
event:Disconnect()
task.wait(.1)
return
end
```
we are not done yet.
now that code above gooes outside any code, so just put it on the first line basically.
and then you know wher eyou put
humanoid.movetofinished:Wait()
replace it with
```
MoveToFinished(*humanoid*,*waypoints*[tostring(index)].Position)
```
you see the humanoid after the first bracket?
you need to say local humanoid = mob.Humanoid -- or wherever your humanoid is
see the waypoints?. yeah you need to copy the code from the loop as shown in the video :D np
i went into detail because i don't know if you know scripting much
@@oscoolerreborn holy thank u so much! :D
@DoseOfDucks What do you do with the code then?
@DoseOfDucks But in later episodes, he changes up the script, would that still work here?
@DoseOfDucks Yeah, I don't think it works for the newer script
Respect to gnome code for making the best tutorial for tower defence
good tutorial. can you make the next one on how the "towers" can be target the enemies walking inside the path?
Eruclips.net/video/xvFZjo5PgG0/видео.html
@@Ihatemyselfthankyou you Tried to RIckrolled him
make sure to watch the rest of his videos about this subject it might be in the next video
THANKS SO MUCH THAT HELPED
The moment he said “hello my little nomes i fell in love and immediately subscribed
I KNOW HOW TO FIX IT
GO TO YOUR CHARACTER THEN GO TO HUMANOID ROOT PART THE UN ANCHOR IT. HOPE THIS HELPED!
@Sharkking3409 in the character?
its in the humanoid root part at the bottom
@@HoppersFN It’s already unanchored do you have any idea why it might not work still?
@Sharkking3409 in the zombie bro
Hey, I wanted to ask, so I did everything like you and when I started testing, zombie wasn't moving, how to fix that?
I checked your script like 5 times and I didn’t find any difference, what did I really do wrong?
Same
Same
make sure that your character has a humanoid. if u cant find the problem still, check the output
same
@@TheMaxGuyfor me my output doesnt say anything
Thanks for the help man, I've been wanting to learn this for a while!
i know im late to this but what do you mean at 6:20
Does anyone notice that the path looks like a dinosaur??
What.
I do
no
No
No
Dawg, I remember doing this tutorial 2 years ago and had no idea of what anything did, but now that I'm somewhat of an advanced scripter, I understand all of it.
can you help em out cuz for me it says Postion is not a valid member of Part "Workspace.Waypoints.1" idk what that means
@@jindai7990 i think its because u have nothing inside of the waypoints folder or the first object in ur folder waypoint isnt a cube
the code basicly looks in the folder waypoints and looks at the first object inside the folder since it cant read its position its likely u havent placed it anywhere or its an object that isnt placed on the map for example a script
@@jindai7990 or u have em wrongfully named the folder or the parts in the folder
@@jindai7990 je i just found it out u have the parts inside of the volder not named correctly u gotta name them form 1 to 12
The zombie script aint worked for me some months ago. But i retryed making the tower defense and your script actually works! I think it's because i typed something wrong and i had the outpot thing closed
how?
One thing I noticed is that when the waypoints are too spaced out from eachother the zombies just break off towards the next one, is there anyway to fix this?
yea all you got to do is zombie.Humanoid.MoveToFinished:Wait()
@@subbydubdub2247 that does not fix the problem, its a bug with maybe roblox? where the game will declare a move to finished if it takes too long.
Hey! This video is very cool but I have one error:
When I tried to make my own custom zombie, it just stands there. It is also not anchored and the script is correct
What do I do in this situation?
Same situation here.
I had the same problem. Rewrite it and then check your spelling.
@@TrashyTonic I just did that and it didn’t work :(
@@shifter231 i also just realized that of you do multiple parts to make something, it won’t work. But if you have like a single part for a arm, a single part for the leg, etc, it would work. So if you make a “detailed” character with extra parts, it wouldn’t work.
same
2:29 pov:
the zombies first time do a smart thing at td games
Everytime I follow A tutorial, the code is outdated, but even two years later and this man has helped me more in the past 4 minutes than anyone else has in 30. Truly A legend. I also now understand The coding (slightly more) of Parents, Moving positions and what meshes actually are. Edit: I actually love you bro. I had a heart attack because it wouldnt go to the positions but then you had the same problem and fixed it lol
pls tell me wath was the problem and how to fix taht
@@jojamesbs8327 At the end of the code Zombie.Humanoid:MoveTo(waypoints[waypoint]) You need to add .position after the closing square bracket
Hey! I hopefully you answer me.. My zombie is only moving to the first waypoint, how can i fix that?
@@Cha_Mat Have you added A hashtag before the word (Its after you put the number 1) waypoints?
@@Valentinos_tounge Yes..
IF YOU'RE HAVING ISSUES WITH YOUR ZOMBIE MOVING, CHECK THIS!
short version: just make sure to not put ur things in folders before ur told to
check the parent, of where you're trying to move your zombie
for me, i was trying to move my zombie to workspace.End.Position,
thx i hope it works now
My custom model that I made is not moving and since i'm not really experienced with coding idk what to do
@@floopi3 check capital letters in the code, make sure you have all the right capital letters when referring to your mob, and make sure it has a humanoid thingy
pls can u make a video and tell me why isnt it moving? , also is it bcos that the waypoints from 1,2,3 etc is in the folder? , and also when should u put them in the folder?
PLSSS I DONT GET IT
I don't understand why my zombie doesn't go to the end if I followed the steps to the letter
Now I realized you made a cut, I'm new to creating games in RE, so showing me the "ending" script would help me a lot. Thank you
what is the actual script then? I'm having trouble too.
I am also I having some trouble, my guy does not even start walking and my way points I set to collision off but I can stand on them? I don’t know how much I’m doing wrong but I can’t get anything to work. :(
@@ragequitplayssame
@@ragequitplays dude I know
Hello GnomeCode!
I'm glad you are doing this series, as Tower Defense games have been a passion far before my Piggy obsession kicked in, lol
Speaking of which, I wanted to ask you if you could make a video about your Teddy shopping system, that's been a slight concern with my game and I'd appreciate shop creating knowledge. :)
2:30 why does it stop after my zombie has walked like exactly a amount of studs? Like 20 studs?.
Yo dude i have a question what do i do when the enemy just goes in waypoint 1 and stay there? how do i fix
also the enemy i made always look behind and walk on the first waypoint
(nvm i managed to fix it by making 12 waypoints instead of 9)
i have the same problem. my zombie just gets stuck
I appreciate it a lot my older brother made a lot of money thanks to you😂
5:37
*G E T C H I L D R E N*
Sus
Lol
Get children
this does not work I have the exact code I’ve been checking for errors for an hour what
It fully works a single mistake will ruin all of the code
Tip for this, make sure the zombie is NOT anchored as I saw it does not move
mine wont move at all
Mine wasn’t moving😭😭😭😭 2:29
It has to be End not end
@@Jkjlox Really?😅 Bc my was not moving either
Same
@@Jkjlox WDYM it has to be End
I’m a bit late but I just fixed mine you need to call the part End for it to work
why isnt it working for me? :( am I doing something wrong?
Is it not working for u at the end
code if anyone needs help
thxx!
anytime
u can actually put more than 1 waypoint and the zombie wont skip
ty
hey my enemy is only going to one waypoint anu help possibly?
Nice video Gnome! However, I’m struggling to loop the script on making the enemy go from one point to another. Do I copy and paste the process or what?
7:37 my zombie doesent do anything wth
Bro same :(
Same hoe do you fix that
How*
@@jorty_boy20 there is nothing here to be corrected
@@blaz_r what do you mean
here's the script if anyone needs it:
local zombie = script.Parent
local waypoints = workspace.Waypoints
for waypoint=1, #waypoints:GetChildren() do
zombie.Humanoid:MoveTo(waypoints[waypoint].Position)
zombie.Humanoid.MoveToFinished:Wait()
end
thanks dude:D
thanks a lot but it doesn't work for some reason or it just me
@@Alim1016Fox it breaks on the second video
When u didn't work remove that script and add script is get work
youre a true g thanks alot
why mine not working?
Yeah mine is jot working too
Not*
-- Before using the script, change the mousy to the name of the character you want to use!!
local Mousy = script.Parent
local waypoints = workspace.Waypoints
for waypoint=1, #waypoints:GetChildren() do
Mousy.Humanoid:MoveTo(waypoints[waypoint].Position)
Mousy.Humanoid.MoveToFinished:Wait()
end
Ok
w
It's not working
@@Sunlightly825 I’ll send you my script
cry@@Sunlightly825
FINALLY SOMEONE THAT DEOSENT SPPED TROUGH EVERYTHING IN LIKA A NANOSECOND
0:46 what if i want the zombie be the dummeis
I didn’t work
Change its body type and stuff
why wont it work for me
code if you guys want to do it:
local zombie = script.Parent
local waypoints = workspace.Waypoints
for waypoint=1, #waypoints:GetChildren() do
zombie.Humanoid:MoveTo(waypoints[waypoint].Position)
zombie.Humanoid.MoveToFinished:Wait()
end
this helped me too much (if your not using a zombie then put the original name for the NPC who you want to script)
W MANN
I love you
Nah it’s that I mean
what a goat better see y’all’s tds game soon 😍
omg tysm youre a goatt
my zombie aint movin he lazy
Zamn that's bad, check that zombie can walk or smth, that happened to me sometime
@@Bacon_godhe can defo walk but it just not working 😂😂😂
@@laytonlewin29hmmm, check if u named everything right in the code
@@Bacon_god I did
YO I DONT BLAME YOU MY ZOMBIE DIDNT MOVE FOR THE 5 TIMES I TRIED THIS😢 I’m still trying but it’s getting super annoying now
People in 2024
I'm confused as to how "waypoints" is understood by the script as each individual spot. Is it targeting the folder and specifying the children?
Like beggar
Me? No IM 2025 no 2024 kk
Me
@@faithofJisnt even asking
Spolier Alert: outdated
Blud fr chatted outdated when its alr 2 years dawg
It dont work :(
i didnt work for me either
@@BoYo5310works for me lol
Why
@@Lino_Gamer456 what does he know? If he would know what doesn't work then he could fix it.
(Same happened here though)
It’s cause it’s an outdated tutorial due to updates
guys gnomecode stoped uploading! OUR LEGEND FOR THIS SERIES
really?
@@ElziraSitioPlayz nvm he's uploading now
Guys, i need help, I write all scripts correct, but theres mistake and output write "WayPoints is not a valid member of Workspace " Workspace"" Help me 😢
well just follow the tutorial lol
It don’t work😢
Same it dont work to me😢
@@Baconmanpro323 shame were the shame buddies😭
could be an error in your code cuz it works
@@A_Countryball but i try it 2 times
show me ur code