If you're having trouble with your player collisions I'd suggest changing CharacterAdded to CharacterAppearanceLoaded in your OnPlayerAdded script. This should give the character a bit more time to load in before it tries to assignt he collision groups.
If you got stuck on setting the collision groups because of the new physics service update heres the script for changing the mobs collision group: (Reccomending to change variables as it varied and don't forget to make sure collision group tables work and are the correct names. I think some parts are depracated so you might need to change Part to BasePart, unless your character models use unions) for i, object in ipairs(newMob:GetDescendants()) do if object:IsA("Part") then object.CollisionGroup = "Mob" end end
due to new update with the collision groups there is now a property, just select every piece then set it to the desired physics group, and for the player a much simpler script can be put inside starter character scripts: local char = script.Parent for i, object in ipairs(char:GetDescendants()) do if object:IsA("BasePart") then object.CollisionGroup = "Player" end end
honestly your channel is underrated. you are definitely my favorite roblox developer youtuber. thank you for all the tutorials and explaining videos on developing :) have a good day
Can someone PLEASE help me with this in the animation script it says attempt to index nil with Play on the walkTrack:Play() line The timestamp for it is 16:06 If you know why please help Thank you
@@cratson8872 so, add a configuration folder and name it “Animations”. Then, add an animation and put the animation ID of your choice and name the animation to “Walk” :)
for those who had issues with the waves and their enemies, here's the simple way to do it: for wave=1, 10 do print("Wave", wave ,"started") if wave == 1 then mob.Spawn("Zombie", 2 * wave, map) end if wave == 2 then mob.Spawn("Zombie", 2 * wave, map) end if wave == 3 then mob.Spawn("Zombie", 2 * wave, map) end and so on
The zombie spawns fine but for my second mob I wanted to make a custom one, but whenever I put it into the script they spawn in but don't move. The error says "Network Ownership API cannot be called on anchored parts or parts welded to Anchored parts" is there a fix
@@jezzthedevofficial I'm guessing after 3 months you solved the problem but for anyone else with a similar issue: you probably accidentally removed or forgot to repeat task.wait() until there are no more mobs on the map
For the people that say that mobs are skipping checkpoints, Instead of scripting, I put like 2 or 3 more checkpoints each path instead of only in yhe corners, so that slow mobs are all the time getting into checkpoints and not skipping bc of the time
Great video! I just have a problem with the animations, when I run the script it says, “unable to create an Instance of type “Animator” is there any way for me to fix this?
I like the way while i was waiting for part 3 to come out i was doing what was coming in this video (basically i did the whole thing in this vid even when it wasn't out)
If your having trouble with this new colision update u can simply turn the mobs colisions off in their properties and im pretty sure in settings of your game you can disable player colision hope it helped
@@voidplays9613 I played around with the settings and changed some words and it worked. It's an easy fix, just need to pay close attention and tweak some stuff.
tip: if you want to make a custom tower, just delete the mesh for the drooling zombie model and start designing, you dont need to make any animations or do any hard work.
I have a few suggestions for after you add in the towers: you can add in a summoner enemy ( summons other enemies ) a big boss enemy, a boss health bar ( for the big boss enemy ), stuns ( for the big boss enemy and maybe some other enemies ), a wave counter ( shows what wave you're on and how many waves there are ), shield enemies ( enemies that carry a shield that can be broken, which makes them faster ) and enemies that spawn in one enemy ( maybe a few enemies ) after death. Please add in at least one of my suggestions if you see this.
maybe also some enemy properties such as: hidden (only specific towers and upgraded ones can target them), metallic (same as with hidden but the towers can target the enemy, they can't deal any damage to it), enemies with defence (get damaged less)
if anyone is wondering how to fix the slow enemys skipping waypoints use this function mob.Move(mob, map) local humanoid = mob:WaitForChild("Humanoid") local waypoints = map.Waypoints for waypoint=1, #waypoints:GetChildren() do repeat humanoid:MoveTo(waypoints[waypoint].Position) until humanoid.MoveToFinished:Wait() end mob:Destroy() end
This sires is amazing im about to be done with this episode im tryna make my own td game and also lean scripting one day this is definetly helping me thank you so much ur so much different from these others tutorial people ur voice, takng ur time, everything is amazing keep up the good work!!!!
@@connorblox2244 yo my man just add waypoints and name them 13 14 15 16 17 18 19 20 DUDE SCRIPT IS GOING LIKE 1 +1 =2 +1 get it? just add waypoints and name them
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 sry im spaming this to anyone tht needs help
You're the best! I am 11 years old and I am learning from you. I gave you subs and paws for all the movies, but I feel that it is still not enough. THANK YOU GNOM!
@GnomeCode for some reason when I got your pack, the teddy animsave was glitched and didn't work (there wasn't a proper animation) i also found your pack on the toolbox just by searching, but that had the same problem any fixes? also, for some reason the first zombie i spawn in the first wave doesn't have the animation, although everything before and after it does, any explanation for this?
There is a bug that slow mobs skip the waypoints before touching it, here's a fix: just replace the mob.move function with this script function mob.Move(mob, map) local humanoid = mob:WaitForChild("Humanoid") local waypoints = map.Waypoints
for waypoint=1, #waypoints:GetChildren() do repeat humanoid:MoveTo(waypoints[waypoint].Position) until humanoid.MoveToFinished:Wait() end
Amazing! Ive built a sort of noob fighting game? I guess and your explanation is really good... You zoom in on the different important stuff just amazing!
The reason the r15 models don't work with collision groups is because the model takes longer to load all the parts. So just put a wait before going through the loop so they all loaded.
If you can`t disable collision fpr a player even though you fpllowed all the rules of the script and there ate no errors,then simply copy this script and paste it into OnPlayersAdded (it worket for me) local Players = game:GetService("Players") local PhysicsService = game:GetService("PhysicsService") Players.PlayerAdded:Connect(function(player) player.CharacterAppearanceLoaded:Connect(function(character) for i, object in ipairs(character:GetDescendants()) do if object:IsA("BasePart") then object.CollisionGroup = "Player" end end end) end)
Can i add custom animations to the mobs like if i go to the toolbox and pick a model that has an animation could i transfer it to the rest of the mobs?
Great series! My son is burning through these trying to create a game but looks like Roblox has updated their coding.... are you planning to make any follow-up videos?
For anyone wondering why their animations aren't working even after changing the ID, it might be because you are in the client and not the server, so if you click "Play" instead of "Run" then the animations will load since you are in the game.
@@liame3441 If you are making the game in a group, also make sure to publish the animation ID to the group your are using for the game instead of "Me". Wishing you luck!
I might have donesomething wrong, but i had a problem with the animation so I added walkTrack:Looped = true right before the walkTrack:Play() and that fixed it for me!
🛑 IMPORTANT 🛑 As of 2023 this script dose not work, (or if collisions are not working) here are the changes: Mob Module Script: replace PhyscicsService:SetPartCollisionGroup(object, "Mob") to object.CollisionGroup = "Mob" OnPlayerAdded Script: replace PhyscicsService:SetPartCollisionGroup(object, "Player") to object.CollisionGroup = "Player" Edit: If your mobs or towers have meshed and parts add this to the checks: Instead of “if objects:IsA(“BasePart”)” do “if objects:IsA(“BasePart”) or object:IsA(“Mesh”) or object :IsA(“Part”) EDIT2: Fixed syntax errors you may have experienced dude to updated Roblox code! (Mom I am famous...)
So helpful, super awesome tutorials, I personally struggle when trying to use other Mobs that aren't provided by you, but it still working pretty great
On line eight in the OnPlayerAdded script, I keep getting a W020 error (line of code shown here: 8:58 ). This also happens with line 30 in the Mob script (line of code shown here: 6:37 ). I've made sure my script is exactly the same as shown in the video, I've tried looking up what the error W020 means, but i cant find anything. Can someone please help me with this? Thanks.
My animations are not working, the folders are in the mobs, they have the id in, the code is correct, but it doesnt work (the animation is called "Walk" too)
same exact problem. I think the issue is when this was uploaded he had his stuff inside a "configuration folder" but the mobs he provided us have the animations inside a configuration
back here after i completed the tutorial, the model needs to be unanchored othereise its just not gonna move, it needs to be in an animation thats inside that config folder
Even though I have the configurations with the animations inside of them, the enemies still wont play their animation that the script instructed them to do. What could it be due to?
@@flamenice7386 that's because if you put a R6 animation into for example a R15 teddy bear, its not going to work unless you put a R15 animation, and the same for R6 Models
If y’all’s collision groups aren’t working, you have to go into collision groups, select all of your mobs in explorer, and click on the plus button to fix the mobs colliding. Hope this helps
@@godtype9706 it should already be on your collision group, but you have to select the models, select the collision group, and click the plus. And I should be in the collision group
I have a problem, when I'm in the part of animations (17:20) I do exactly the script in this part, but the problem is the mech is the only one enemy who has the walk animation, and the other don't have it, someone help plz.
Sorry, I'm a bit late. I had the same problem. You need to open the Animation Editor plugin, click on any mob that does not have the animation and click "Publish to Roblox" (see 1:45). Then you need to copy the ID of the animation you just published. Lastly you need to replace the AnimationId of the "Walk" animation inside the "Animations" folder in the mob model with the ID you just copied. I hope it helped!
My animations don't work what so ever, the animation priority is movement, I've been running my game in play, my animations are archivable, and I've also tried looping the animation. Nothing seems to be working.
part 4 suggestion: 1. Place tower system 2. make support tower(like commander that give the buff in tds and dj that give you discout buff in tds) 3. make unit tower(like clook boss and military base in tds) 4. Make cliff tower and cliff mods 5. Make fram tower that give you money per wave 6. More maps(when you go to elevator you gonna go to main game but it change map as well as the elevator said) THAT IS(if it too much you can skip to other part) bye
me when people say “like in tds” when TDS copied TB: Also, making unique towers is better than copying a game, legit not every single TD game should copy TB like TDS did. And DJ gives a range boost and a discount boost, not just a discount boost.
Uh hi excuse me i have a problem concerning the line of code: local walkAnimation = animationsFolder:WaitForChild("Walk") even after i changed it from object to animations folder it still says there is an infinite yield possible.
GUYS IF UR ANIMATION DOES NOT WORK AND THERE IS NO ERROR THIS MIGHT BE THE PROBLEM: you cannot just run the game you have to actually play it, this is because the script is in starter player and if u run it their is no player. IK this seems simple but it took me like 30 mins to figure this out I hope this helped u
For anyone that want to do custom waves here the code The number 3 is the last wave for wave=1, 3 do If wave == 1 then mob.Spawn("Zombie", 2, map) End If wave == 2 then mob.Spawn("Zombie", 9, map) End If wave == 3 then mob.Spawn("Zombie", 9, map) mob.Spawn("Mech", 4, map) End repeat Task.wait(1) Until #map.Mobs:GetChildren() == 0 Task.wait (5) -- the intermission time to next wave End Remember I dont put the prints in there
Hello, I know it's been a long time since you uploaded this video but to see if you can upload it again or make another one where you improve the collision script, they changed it :)
@@abloxbablox6648 That can sometimes happen, but the animations (expect zombie on) do work. I thought that the animation doesn't work when you testview the game but it does work when you testplay the game. So my question is did you actually play it or did you let the scripts work in inspector mode?
I've spent so much time copying this and making it all but I've finally done it here's the code for anyone to take lazy or not. EDIT: I misspelled the animator part so if it doesn't work that's why. EDIT2: YOU HAVE TO WATCH THE VIDEO OR THE CODE WILL NOT WORK. And if you copy it and it doesn't work, do not come to me with problems. Just watch the video. Main Script: local mob = require(script.Mob) local map = workspace.Grassland for wave=1, 10 do print("Wave Starting:", wave)
My tip for custom animations is you should just skip the animation part, keep the animate script, and use a npc idle animation script from the toolbox if your not up for coding it yourself
If you get stuck on the player still colliding with the enemies I think this is the fix: Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) for i, object in ipairs(character:GetDescendants()) do if object:IsA("BasePart") then object.CollisionGroup = "Player" end end end) end)
IF YOU GUYS ARE HAVEING TROUBLE LOADING THE ANIMATION its because that you dont have an animation save if you go to the zombie that he has in his video it has a animSaved thats how the zombies the only one that has an animation so all you got to do is make and animation and save it....ALSO IF YOU dont want to make an animation all you have to do is go into the avatar mode at the top of you view click on it click on anim editor click on what you want to have the animation your then going to click the three dots press save then you want to put the animation id into the animation and it will work
The series is great and really helps alot! But I still cant figure how how to improve the enemy waves because it always ends up not spawning any enemies
If anybody is wondering the new version of studio no longer uses animation folders so if you want to paly an animation you have to have a script and animation in the enemy instead of 1 script controlling all
@@ChickenNuggetManCNM i am stupid, i was looking at it through the "run" option, while the animations work on the CLIENT instead of the SERVER, it works, thank you!
I have a problem. So, when I loaded in, I couldn't collide with zombies, which is good. However, I could collide with Mech and also the zombies. The collision groups are configured as in the video. Help needed.
If anyone is trying to make custom enemies and animations, before publishing the animations, make sure you set the animation priority to Movement first! ALWAYS DO THAT
To everyone who is struggling with the new Collision Thing: for i, object in ipairs(newMob:GetDescendants()) do if object:IsA("BasePart") then object.CollisionGroup = "Mob" end end
Towers attack enemies is easy, there are kits that are useful. I rescripred that tower script to make it able to shoot bullets at enemies. The kit also contains a damage base system but it sucks
for the people thats using the latest version of Roblox Studio, you might find that the PhysicsService:SetPartCollisionGroup() is now Deprecated. Instead, try this: for i, object in ipairs(newMob:GetDescendants()) do if object:IsA("BasePart") then object.CollisionGroup = "Mob" PhysicsService:CollisionGroupSetCollidable("Mob", "Mob", false) end end If this still doesnt work, check if your Collision Group has an uppercase "M" and not a lowercase "m".
As I was going through the code, I seem to have ran into every problem everyone else was having. The animation alone almost got me, good thing it was a simple fix in the end LOL
@@ieid73 LMAO my youtube is blasted usually with notifications so I didn't notice you all asking until now. The fix was that I had to rename the animations folder, then reimport the animations itself to make sure that each one was correctly made and imported with a chance of corruption. After all of that I would do a quick revision to make sure all of the code was correctly typed in, so that nothing was out of place. This is important later in the series since he tends to implement and remove a lot of code, so making sure to know which is where is a good habit.
For anyone who is experiencing an issue where you have a longer map and your Mobs are skipping some turns/waypoints, it's because your MoveTo() function times out after 8 seconds. To fix this, simply add more waypoints along the path, even if they're not at turns, it will still work. Hope this helps!
Alternate solution: for checkpoint = 1, #checkpoints:GetChildren() do repeat guy:MoveTo(checkpoints[checkpoint].Position) local reached = guy.MoveToFinished:Wait() until reached end
Great job, I love this so far. Thanks for your pinned comment. I would like to say however when using walk with Teddy and Zombie, for me (could be this newest version of Roblox) it does not run their animation / half runs them. I tested multiple different animations for the Zombie and it really only puts their hands out and does not move their legs (idk why) and Teddy has no changes and no walk animation even though it says he has one and it does not create any errors. Do you know if this is your animations getting outdated or not fitting the character sizes as r6 and r15s are different or what?
here is my code : local function animateMob(object) local humanoid = object:WaitForChild('Humanoid') local animationsFolder = object:WaitForChild("Animations")
if humanoid and animationsFolder then local walkAnimation = animationsFolder:WaitForChild("Walk") if walkAnimation then local animator = humanoid:FindFirstChild("Animator") or Instance.new("Animator", humanoid) local walkTrack = animator:LoadAnimation(walkAnimation) walkTrack:Play() end else warn("no humanoid/animation folder for", object.Name) end end workspace.Mobs.ChildAdded:Connect()
If you are having trouble with the collision because of the update this is the script: for i, object in ipairs(newMob:GetDescendants()) do if object:IsA("BasePart") then object.CollisionGroup = "Mob" end end
can anyone tell me why object.CollisionGroup = "Mob" isnt working even if i replace instead of PhysicsService:SetPartCollisionGroup = (object, "Mob") they still collide, my code is local PhysicsService = game:GetService("PhysicsService") local ServerStorage = game:GetService("ServerStorage") local mob = {} function mob.Move(mob, map) local humanoid = mob:WaitForChild("Humanoid") local waypoints = map.Waypoints for waypoint=1, #waypoints:GetChildren() do humanoid:MoveTo(waypoints[waypoint].Position) humanoid.MoveToFinished:Wait() end mob:Destroy() end function mob.Spawn(name, quantity, map) local mobExists = ServerStorage.Mobs:FindFirstChild(name) if mobExists then for i=1, quantity do task.wait(0.5) local newMob = mobExists:Clone() newMob.HumanoidRootPart.CFrame = map.Start.CFrame newMob.Parent = map.Mob for i, object in ipairs(newMob:GetDescendants()) do if object:IsA("BasePart") then object.CollisionGroup = "Mob" end end coroutine.wrap(mob.Move)(newMob, map) end else warn("Requested mob does not exist:", name) end end return mob
To people saying the animations don't work, I have the solution. There is either 2 things wrong 1. You're running instead of playing (local script = client side, running is server side) (ALMOST ALWAYS THE CASE) 2. You've incorrectly typed the script
For those with none or only one mob animating with custom animations: 1. Set the animation priority to ‘Movement’. 2. Under the ‘Print WAVE STARTING’ add in a ‘wait()’. Hopefully this helps 🤞
If you're having trouble with your player collisions I'd suggest changing CharacterAdded to CharacterAppearanceLoaded in your OnPlayerAdded script. This should give the character a bit more time to load in before it tries to assignt he collision groups.
It work thx 😎😎😎
how do you make attack animations from the enemies like stunning properties?
I almost had a heart attack of relief when that worked
Thanks But I cant get the animations working :/
YESS I tried like 5 times and it wouldn’t work but then I saw this comment and tried what you said and it worked thx a lot!
Thanks! These tutorials are super helpful and clear.
Money
@@Chip_-mw5nm money
@@alexskorpik11play79 money
@@BlueBlaze_Offical money
@@Its_Yanzi money
This series keeps getting better as it goes along! Keep this up Gnome! It’s Amazing ⭐️⭐️👍
agreeed the best i ahd seen ngl lol
can someone send me the main script mine seems to be doesn't work :(
@@KarlisTaken
@@KarlisTaken Try to check the script correctness. Maybe it help
I very agree with that answer
If you got stuck on setting the collision groups because of the new physics service update heres the script for changing the mobs collision group:
(Reccomending to change variables as it varied and don't forget to make sure collision group tables work and are the correct names. I think some parts are depracated so you might need to change Part to BasePart, unless your character models use unions)
for i, object in ipairs(newMob:GetDescendants()) do
if object:IsA("Part") then
object.CollisionGroup = "Mob"
end
end
thank you
THANK YOU OMG I'VE BEEN FIXING THIS AND NOW YOU? YOU FIXED IT YESSS GO FUCKIN
Ah i appreciate it dude
i copy and pasted everything and for some reason my player still collides with the enemies? do you know how to fix this?
thank you
due to new update with the collision groups there is now a property, just select every piece then set it to the desired physics group, and for the player a much simpler script can be put inside starter character scripts:
local char = script.Parent
for i, object in ipairs(char:GetDescendants()) do
if object:IsA("BasePart") then
object.CollisionGroup = "Player"
end
end
THANK U SO MUCHHHHHH
honestly your channel is underrated. you are definitely my favorite roblox developer youtuber. thank you for all the tutorials and explaining videos on developing :) have a good day
he deserves his 100k playbutton
3Q play button 😂😊
This Is The Best Tower Defense Tutorial i Have Ever Seen You Earned My Sub Keep Up With The God Series
Thanks so much, I really appreciate the support!
@@GnomeCode No Problem But There Is An Bug Or An Error Or Something For Me Cuz My Player Has No Collision To The Mobs
@@wexzy4037 the tutorial said to disable collisions to the mobs in the collision groups section of this video
@@ChirpFPV ik and i did that
@@wexzy4037 so then your player has no collision to the mobs
If you want to alternate between enemies:
for i = 1, (number) do
mob.Spawn(type1, 1, map)
mob.Spawn(type2, 1, map)
end
whats alternate between enemies?
@@WoolyBliss like one zombie 1 mech 1 zombie 1 mech one zombie 1 mech
Can someone PLEASE help me with this in the animation script it says attempt to index nil with Play on the walkTrack:Play() line
The timestamp for it is 16:06
If you know why please help
Thank you
At this point i dont even watch the tutorials to learn about scripting, I watch them since i like gnomecodes voice
GnomeCode ASMR lol
lol
Bruh im dying of cringe
@@GnomeCode sorry for wasting your time, but what if i add my models? Like how do i put animation?
@@cratson8872 so, add a configuration folder and name it “Animations”. Then, add an animation and put the animation ID of your choice and name the animation to “Walk” :)
for those who had issues with the waves and their enemies, here's the simple way to do it:
for wave=1, 10 do
print("Wave", wave ,"started")
if wave == 1 then
mob.Spawn("Zombie", 2 * wave, map)
end
if wave == 2 then
mob.Spawn("Zombie", 2 * wave, map)
end
if wave == 3 then
mob.Spawn("Zombie", 2 * wave, map)
end
and so on
The zombie spawns fine but for my second mob I wanted to make a custom one, but whenever I put it into the script they spawn in but don't move. The error says "Network Ownership API cannot be called on anchored parts or parts welded to Anchored parts" is there a fix
@@WhyIsSveenyTaken did u unanchor it?
Sorry if this is a dumb question but how do I make it so it doesn’t multiply by itself every wave I can’t figure it out
@@eggguyrblx9319 not sure if you arleady found out but just remove the "* wave" and set it to the number you want
tysm this really helped
Love how you describe every function well, along with the purpose. Thank you for teaching me GnomeCode ! :]
Hey dude, r u making ur own wave system like me? Bc im having trouble with it bc its just sending the waves out straight away...
@@jezzthedevofficial I'm guessing after 3 months you solved the problem but for anyone else with a similar issue: you probably accidentally removed or forgot to repeat task.wait() until there are no more mobs on the map
@@simvoid4347 yep lol
For the people that say that mobs are skipping checkpoints, Instead of scripting, I put like 2 or 3 more checkpoints each path instead of only in yhe corners, so that slow mobs are all the time getting into checkpoints and not skipping bc of the time
bro u saved me
Thank you man, You're a life saver
OMG TYSM I LOVE YOU
Bros lifesaving without trying😅
Tysm for helping me with that!!!
Great video! I just have a problem with the animations, when I run the script it says, “unable to create an Instance of type “Animator” is there any way for me to fix this?
not enough money for him to give a shit lmfao
make the animation type movement
could you provide the script
I like the way while i was waiting for part 3 to come out i was doing what was coming in this video (basically i did the whole thing in this vid even when it wasn't out)
Pro!
If your having trouble with this new colision update u can simply turn the mobs colisions off in their properties and im pretty sure in settings of your game you can disable player colision hope it helped
Where I off the properties
can you help me?
Ye I can help
Go in the comments and do what gnomecode commented that should work
@@voidplays9613 I played around with the settings and changed some words and it worked. It's an easy fix, just need to pay close attention and tweak some stuff.
I've been wanting to make a TD game for ages, this has allowed me to achieve my goals!
what game u made can u help me?
same here :)
this series has helped me out so much! thanks so much for making it
love how he also teaches us how to fix problems
... yes and no
@@Dexhammy Yesn't
What a great series! Not for the faint of heart; but very clearly and logically presented. A++++
Great series, works, can't wait till the tower system is implemented!
I might actually try this because its so satisfying seeing things come together
true
tip: if you want to make a custom tower, just delete the mesh for the drooling zombie model and start designing, you dont need to make any animations or do any hard work.
do u mean mob?
@@tableduck- same thing
@@SukunaIsCold nope
that 'oooh heres teddy' at 20:12 got me 😭😭
I have a few suggestions for after you add in the towers: you can add in a summoner enemy ( summons other enemies ) a big boss enemy, a boss health bar ( for the big boss enemy ), stuns ( for the big boss enemy and maybe some other enemies ), a wave counter ( shows what wave you're on and how many waves there are ), shield enemies ( enemies that carry a shield that can be broken, which makes them faster ) and enemies that spawn in one enemy ( maybe a few enemies ) after death. Please add in at least one of my suggestions if you see this.
Very good idea
Great ideas!!
i love it
maybe also some enemy properties such as: hidden (only specific towers and upgraded ones can target them), metallic (same as with hidden but the towers can target the enemy, they can't deal any damage to it), enemies with defence (get damaged less)
@gnome code
this series is amazing! i cannot wait until part 4.
lol
its already here
if anyone is wondering how to fix the slow enemys skipping waypoints use this
function mob.Move(mob, map)
local humanoid = mob:WaitForChild("Humanoid")
local waypoints = map.Waypoints
for waypoint=1, #waypoints:GetChildren() do
repeat
humanoid:MoveTo(waypoints[waypoint].Position)
until
humanoid.MoveToFinished:Wait()
end
mob:Destroy()
end
Hey bro do you know how to fix the collide? it doesn't work one me it's still colliding please help bro
@@its_me_loki04 yo use this
for i, object in ipairs(newMob:GetDescendants()) do
if object:IsA("BasePart") then
object.CollisionGroup = "Mob"
end
end
Not all heroes wear capes, unless you do wear a cape!
I just added more waypoints to fix it
thank u so much bro
This sires is amazing im about to be done with this episode im tryna make my own td game and also lean scripting one day this is definetly helping me thank you so much ur so much different from these others tutorial people ur voice, takng ur time, everything is amazing keep up the good work!!!!
A slight problem with this series; any enemy with =
add more waypoints
@@connorblox2244 okay, thanks I’ll try that
@@connorblox2244 yo
my man just add waypoints and name them 13 14 15 16 17 18 19 20 DUDE SCRIPT IS GOING LIKE 1 +1 =2 +1
get it? just add waypoints and name them
spend 3-5 hours duplicating moving and naming new waypoints
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
sry im spaming this to anyone tht needs help
You're the best! I am 11 years old and I am learning from you. I gave you subs and paws for all the movies, but I feel that it is still not enough. THANK YOU GNOM!
im also 11 and yeah these tutorials are reallly good
You need to be 13+ to make a youtube account
@@polyaro2504 Thats just you lmfao.
I made mine at 10.
I'm 13 now.
@@polyaro2504 No one cares
@@HexDoesStuff Dogs don't care they listen
nice tutorial! you motivated me into become a game developer. you earned yourself a new subscriber
thanks gnome code i also inproved my waves and it worked! thanks gnome code for the support!
My friend really wanted me to make a tower defense and your tutorials are really helpful
@GnomeCode for some reason when I got your pack, the teddy animsave was glitched and didn't work (there wasn't a proper animation)
i also found your pack on the toolbox just by searching, but that had the same problem
any fixes?
also, for some reason the first zombie i spawn in the first wave doesn't have the animation, although everything before and after it does, any explanation for this?
just make your own enemies
i have same problem tho
i have same problem too
me too😭😭
I just made my own
There is a bug that slow mobs skip the waypoints before touching it, here's a fix:
just replace the mob.move function with this script
function mob.Move(mob, map)
local humanoid = mob:WaitForChild("Humanoid")
local waypoints = map.Waypoints
for waypoint=1, #waypoints:GetChildren() do
repeat
humanoid:MoveTo(waypoints[waypoint].Position)
until
humanoid.MoveToFinished:Wait()
end
mob:Destroy()
end
After i done this, On the main script line 1, its saying "Module code did not return exactly one value" Do you know a fix?
Thanks a lot!
Thanks!
thanks, youre a life saver!
it does not come out to replace their mobs get up in the place where they put it and why is that?
Something I recommend when renaming scripts, say “script name”(can be anything) and then script/local script, it’s way easier to find in explorer
Amazing! Ive built a sort of noob fighting game? I guess and your explanation is really good... You zoom in on the different important stuff just amazing!
The reason the r15 models don't work with collision groups is because the model takes longer to load all the parts. So just put a wait before going through the loop so they all loaded.
Thanks! That fixed my script!
Thank you
thank you
How log do I put wait?
If you can`t disable collision fpr a player even though you fpllowed all the rules of the script and there ate no errors,then simply copy this script and paste it into OnPlayersAdded (it worket for me)
local Players = game:GetService("Players")
local PhysicsService = game:GetService("PhysicsService")
Players.PlayerAdded:Connect(function(player)
player.CharacterAppearanceLoaded:Connect(function(character)
for i, object in ipairs(character:GetDescendants()) do
if object:IsA("BasePart") then
object.CollisionGroup = "Player"
end
end
end)
end)
15:31 just saving my spot also keep up the good work gnome :) 👍
Can i add custom animations to the mobs like if i go to the toolbox and pick a model that has an animation could i transfer it to the rest of the mobs?
Great series!
My son is burning through these trying to create a game but looks like Roblox has updated their coding.... are you planning to make any follow-up videos?
same! i really hope he is. get this comment to the top!
Your a good dad
the code still works check if he has written it properly
@@yuzy5896 he wont
GET THIS COMMENT TO TOP
Thanks for the series it's really amazing, I love how you explain everything !!
I am totally hyped for the whole series since I'm making my own game like this and i love the series. Keep it, GnomeCode
Nice! Hope you game does well
For anyone wondering why their animations aren't working even after changing the ID, it might be because you are in the client and not the server, so if you click "Play" instead of "Run" then the animations will load since you are in the game.
It still is not working for me
@@liame3441 If you are making the game in a group, also make sure to publish the animation ID to the group your are using for the game instead of "Me". Wishing you luck!
it did not work
It was just a suggestion, will not always work, wish you luck!@@zomzilla420
What is infinite yeikd
I might have donesomething wrong, but i had a problem with the animation so I added walkTrack:Looped = true right before the walkTrack:Play() and that fixed it for me!
if your animation doesnt work, make sure to add a " wait(x) " before spawning in your firstmob.
Where do i add it
@@RainbowGamer211 in the main script before your first wave
K tysm
But what line
I dont code :|
🛑 IMPORTANT 🛑
As of 2023 this script dose not work, (or if collisions are not working) here are the changes:
Mob Module Script:
replace PhyscicsService:SetPartCollisionGroup(object, "Mob") to object.CollisionGroup = "Mob"
OnPlayerAdded Script:
replace PhyscicsService:SetPartCollisionGroup(object, "Player") to object.CollisionGroup = "Player"
Edit:
If your mobs or towers have meshed and parts add this to the checks:
Instead of “if objects:IsA(“BasePart”)”
do
“if objects:IsA(“BasePart”) or object:IsA(“Mesh”) or object :IsA(“Part”)
EDIT2: Fixed syntax errors you may have experienced dude to updated Roblox code! (Mom I am famous...)
thanks
Da best
Tysm!
thanks g
godly comment
i wanted my first roblox game to be a tower defense and your vid was right there
So helpful, super awesome tutorials, I personally struggle when trying to use other Mobs that aren't provided by you, but it still working pretty great
True but on last part he did script and I didn’t know how to do it so I just watched next tutorial
@@popaccelerator-ox2mgreply to me if ur having mob collision troubles
@@iam100percentaurl im having trouble
do you know how to make the animations for custom rigs?
On line eight in the OnPlayerAdded script, I keep getting a W020 error (line of code shown here: 8:58 ). This also happens with line 30 in the Mob script (line of code shown here: 6:37 ). I've made sure my script is exactly the same as shown in the video, I've tried looking up what the error W020 means, but i cant find anything. Can someone please help me with this? Thanks.
i didnt get any errors but it isnt even working xD
same XD
@@noob-xu3ws hey guy make sure to save the game and make the player r6 or r16 in the avatar sttetings :)
@@firestorme3709 big brain move
@@firestorme3709 THANKS SOOOO MUCH!!!!
My animations are not working, the folders are in the mobs, they have the id in, the code is correct, but it doesnt work (the animation is called "Walk" too)
Same thing happend with me you need to play it not in viewing
@@XenDev-XD i recomend you to use a script on the toolboox called "playanimation"
@@XenDev-XD What do you mean with that?
same exact problem. I think the issue is when this was uploaded he had his stuff inside a "configuration folder" but the mobs he provided us have the animations inside a configuration
back here after i completed the tutorial, the model needs to be unanchored othereise its just not gonna move, it needs to be in an animation thats inside that config folder
In the current update if you just add the mobs into the group by selecting them and pressing the big plus then it will work just fine
thank you so much, I'm on episode six and you've just saved my game
@@Valentinos_tounge Np Just looking out for fellow devs
This is EXTREMELY helpful to me as I keep making Tower Defense games with kits and free models.
same
hey wanna work together? i wanna make TH-camr Tower defense simulator
Even though I have the configurations with the animations inside of them, the enemies still wont play their animation that the script instructed them to do.
What could it be due to?
I think I have the same problem, I don't know.
@@thealtaccount9982 same for me
@@YBU152 maybe misspelling somewhere?
@@lynner175 i checked, no misspelling
@@YBU152 then idk
Lol it took me 10 minutes to realize the animations only work when you actually play the game, and they dont work when you run it
I aslo Had To Delete the Zombie And Teddy Because there animations werent playing properly
@@flamenice7386 that's because if you put a R6 animation into for example a R15 teddy bear, its not going to work unless you put a R15 animation, and the same for R6 Models
@flamenice7386 tysm for mentioning u have to play the game, i was super confused why mine wasn’t working so tysm
If y’all’s collision groups aren’t working, you have to go into collision groups, select all of your mobs in explorer, and click on the plus button to fix the mobs colliding. Hope this helps
Thank you, the only person to say this.
@@leeumyupdrip2879 you’re welcome 👍
Huh?? the little plus that adds stuff? Then do what after you click it?
@@godtype9706 it should already be on your collision group, but you have to select the models, select the collision group, and click the plus. And I should be in the collision group
why havent anyone else mentioned it, thanks dude!!
I have a problem, when I'm in the part of animations (17:20) I do exactly the script in this part, but the problem is the mech is the only one enemy who has the walk animation, and the other don't have it, someone help plz.
Sorry, I'm a bit late. I had the same problem. You need to open the Animation Editor plugin, click on any mob that does not have the animation and click "Publish to Roblox" (see 1:45). Then you need to copy the ID of the animation you just published. Lastly you need to replace the AnimationId of the "Walk" animation inside the "Animations" folder in the mob model with the ID you just copied. I hope it helped!
same lol
@@KarZeCompanybro can you help me i tried to do this with teddy and he dont have animations!idk what it
My animations don't work what so ever, the animation priority is movement, I've been running my game in play, my animations are archivable, and I've also tried looping the animation. Nothing seems to be working.
same
part 4 suggestion:
1. Place tower system
2. make support tower(like commander that give the buff in tds and dj that give you discout buff in tds)
3. make unit tower(like clook boss and military base in tds)
4. Make cliff tower and cliff mods
5. Make fram tower that give you money per wave
6. More maps(when you go to elevator you gonna go to main game but it change map as well as the elevator said)
THAT IS(if it too much you can skip to other part) bye
me when people say “like in tds” when TDS copied TB:
Also, making unique towers is better than copying a game, legit not every single TD game should copy TB like TDS did.
And DJ gives a range boost and a discount boost, not just a discount boost.
@@tomfooIeryz nah bro chill tb is focused more on pvp while tds is survival 💀
@@tomfooIeryz uhh so making a tower defense game is copying tb?
@@louieporsche1174 lol
@@tomfooIeryz Thats just a common idea in any tower defense game
11:07 Start of animations
Just an idea for new episodes, maybe when you make towers you do 2 towers per episode. Also please make a video on making a farm and sniper tower.
Snipers would be interesting since it would need cliffs to be placed
not exactly, look at tbz with their sniper, and also hunter from tds is pretty much just a sniper on the ground
@@tomfooIeryz that's of course super easy to make, just grab a basic tower and set it's fire rate to slow
@@lukiValent is it?? animations, making the sniper, and other stuff
Uh hi excuse me i have a problem concerning the line of code: local walkAnimation = animationsFolder:WaitForChild("Walk") even after i changed it from object to animations folder it still says there is an infinite yield possible.
try joining his discord server theres moderators and people who cna help
You might not want the quotes around walk
But that’s just a guess
You need to put walk animation into a custom one to fix it and it fixed it i also had it too just do a custom animation
same issue please someone help
@@Gumbibullthis sounds like it would help but i dont understand please explain more :)
Idk how but for me, I used your zombie model but the animation doesn't work for it. Any ideas as to how to fix it?
learn how to code
@@IamTheDawgRBLX WOAH SO INTUITIVE
@@r4nd0mzzz You have to replace the id of the animation
@@DaKingBread when I do that it doesnt work and just breaks the mech animation
@@DaKingBread nevermind the problem was I was running it instead of playing it tysm
GUYS IF UR ANIMATION DOES NOT WORK AND THERE IS NO ERROR THIS MIGHT BE THE PROBLEM:
you cannot just run the game you have to actually play it, this is because the script is in starter player and if u run it their is no player.
IK this seems simple but it took me like 30 mins to figure this out I hope this helped u
i had to learn that the hard way😭
Add people from your Discord as enemies, it would be fun to see some people like Richard running around XD
Bread enemy👹
I would love to see an imposter gnome one was well
Me running around?
ah yes, add me >:D
pr o
For anyone that want to do custom waves here the code
The number 3 is the last wave
for wave=1, 3 do
If wave == 1 then
mob.Spawn("Zombie", 2, map)
End
If wave == 2 then
mob.Spawn("Zombie", 9, map)
End
If wave == 3 then
mob.Spawn("Zombie", 9, map)
mob.Spawn("Mech", 4, map)
End
repeat
Task.wait(1)
Until #map.Mobs:GetChildren() == 0
Task.wait (5) -- the intermission time to next wave
End
Remember I dont put the prints in there
doesnt work
Sorry, I forgot to put the )
Fixed now try it.
@@vPedro_YT how can i collide That the zombie wont touch eachother
thank you🙏
1:53 I go and put the ID for zombie and teddy and when I publish it, it says submission failed HTTP Error: 422
idk if you fixed but i think its the name of the animation because sometimes that happens so try renaming it
Hello, I know it's been a long time since you uploaded this video but to see if you can upload it again or make another one where you improve the collision script, they changed it :)
FULL WORKING SCRIPT:
MAIN:
local mob = require(script.Mob)
local map = workspace.Grassland
for wave=1, 10 do
print("Wave Starting:", wave)
if wave
my animation not working
@@abloxbablox6648 That can sometimes happen, but the animations (expect zombie on) do work. I thought that the animation doesn't work when you testview the game but it does work when you testplay the game. So my question is did you actually play it or did you let the scripts work in inspector mode?
@@GamerTheThird i tested the game and the animation of the noob was not working
@@abloxbablox6648 if you placed everything in the correct folder And copied my script it should work. I have no idea why your animation doesn't work
@@GamerTheThird do u have dizzy? cause i can send you any picture to help me out maybe? if you have time
I've spent so much time copying this and making it all but I've finally done it here's the code for anyone to take lazy or not.
EDIT: I misspelled the animator part so if it doesn't work that's why.
EDIT2: YOU HAVE TO WATCH THE VIDEO OR THE CODE WILL NOT WORK. And if you copy it and it doesn't work, do not come to me with problems. Just watch the video.
Main Script:
local mob = require(script.Mob)
local map = workspace.Grassland
for wave=1, 10 do
print("Wave Starting:", wave)
if wave
for the module script after wave 1 it says "ServerScriptService.Main.Mob:25: attempt to index number with 'Start'
@@Poland77777 Did you anchor the spawn and make sure that it cannot be collided with?
@@tweaker_deaker yes
for the mob module script say me Mobs is not a valid member of Workspace "Workspace"
All of this works correctly - it must be an issue with the code yall are writing tbh
My tip for custom animations is you should just skip the animation part, keep the animate script, and use a npc idle animation script from the toolbox if your not up for coding it yourself
Earlier I was struggling with collisions. Thanks for fixing my issue!
im having the same issue can u tell me what was wrong with urs and how it was fixed cuz it might be a bit like mine
@@RobinDeTrollBoy make players r16, to fix it.
@@indominusvoids8798 R6 or R15?
If you get stuck on the player still colliding with the enemies I think this is the fix:
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
for i, object in ipairs(character:GetDescendants()) do
if object:IsA("BasePart") then
object.CollisionGroup = "Player"
end
end
end)
end)
It doesnt Work sadly
THANK YOU SO MUCH!!!
YOU ARE THE BEST ROBLOX TH-camR EVER
It would be nice to see a tutorial on how to work lobby elevators/teleporters
there is one
IF YOU GUYS ARE HAVEING TROUBLE LOADING THE ANIMATION its because that you dont have an animation save if you go to the zombie that he has in his video it has a animSaved thats how the zombies the only one that has an animation so all you got to do is make and animation and save it....ALSO IF YOU dont want to make an animation all you have to do is go into the avatar mode at the top of you view click on it click on anim editor click on what you want to have the animation your then going to click the three dots press save then you want to put the animation id into the animation and it will work
wtf, I don't understand anything, pls fix ur grammar dude
hm i was in a rush@@oofbloxGG
xd@xyizsilver
@xyizsilver broi messed up
\
\
I'm having the opposite issue. The Zombie is the only one without an animation for me.
The series is great and really helps alot! But I still cant figure how how to improve the enemy waves because it always ends up not spawning any enemies
it spawns too much zombies for me
yeah
@@waktk the amount of enemies multiplies each wave, and at wave 5, 500 zombies spawn because he put 100 x wave for the zombies one.
@@sraiaan i didnt put the * for my waves
@@waktk "*" means multiplie the number
If anybody is wondering the new version of studio no longer uses animation folders so if you want to paly an animation you have to have a script and animation in the enemy instead of 1 script controlling all
how do you do that
Hi, for anybody having trouble with the animations, after the walkTrack:Load() line, put
walkTrack:Play()
walkTrack.Looped = true
thank you, still does not work;_;
@@basicnodes7029 worked for me...
@@ChickenNuggetManCNM i am stupid, i was looking at it through the "run" option, while the animations work on the CLIENT instead of the SERVER, it works, thank you!
@@basicnodes7029 lol happy to help
who do u fix this? ServerScriptService.Main.Mob:25: attempt to index number with 'Start'
I have a problem.
So, when I loaded in, I couldn't collide with zombies, which is good.
However, I could collide with Mech and also the zombies.
The collision groups are configured as in the video.
Help needed.
me too! any ideas?
@@ThatGuyGblox pretty sure i just gave up after that
If anyone is trying to make custom enemies and animations, before publishing the animations, make sure you set the animation priority to Movement first! ALWAYS DO THAT
OMG THANKS I HAD AN ERROR BUT YOUR TRULLY A GIGA CHAD AND GAVE ME 1 SECOND TO REALISE
it didn't work
@@dabugaseo2061 can you send your script?
@@crossx25 what is the error??
@@qwerty_qwerty animation wont playing
To everyone who is struggling with the new Collision Thing:
for i, object in ipairs(newMob:GetDescendants()) do
if object:IsA("BasePart") then
object.CollisionGroup = "Mob"
end
end
Do you have a player collision one?
Do a tutorial on how to make towers to damage zombies, then to make the base have health and be damaged, then to make some zombies stun the towers.
Towers attack enemies is easy, there are kits that are useful. I rescripred that tower script to make it able to shoot bullets at enemies. The kit also contains a damage base system but it sucks
up
@@lukiValent the config is different
for the people thats using the latest version of Roblox Studio, you might find that the PhysicsService:SetPartCollisionGroup() is now Deprecated. Instead, try this:
for i, object in ipairs(newMob:GetDescendants()) do
if object:IsA("BasePart") then
object.CollisionGroup = "Mob"
PhysicsService:CollisionGroupSetCollidable("Mob", "Mob", false)
end
end
If this still doesnt work, check if your Collision Group has an uppercase "M" and not a lowercase "m".
Yo my mobs have hats but when I play they disappeared
tysm
tysm! it works
@@ishakw idk how to fix that my hats work perfectly fine
what did u put in for the playeradded script?
As I was going through the code, I seem to have ran into every problem everyone else was having. The animation alone almost got me, good thing it was a simple fix in the end LOL
What's the fix?
haha yeah man good thing it was a simple fix man haha no need to tell us right
Can u tell me the fix im new to roblox studio, pls
WHATS THE FIX
@@ieid73 LMAO my youtube is blasted usually with notifications so I didn't notice you all asking until now.
The fix was that I had to rename the animations folder, then reimport the animations itself to make sure that each one was correctly made and imported with a chance of corruption. After all of that I would do a quick revision to make sure all of the code was correctly typed in, so that nothing was out of place. This is important later in the series since he tends to implement and remove a lot of code, so making sure to know which is where is a good habit.
10:10 just marking my spot great tutorial so far 🦆
For anyone who is experiencing an issue where you have a longer map and your Mobs are skipping some turns/waypoints, it's because your MoveTo() function times out after 8 seconds. To fix this, simply add more waypoints along the path, even if they're not at turns, it will still work. Hope this helps!
Thank's dude!!
Exactly the issue I was facing, thank you!!
Alternate solution:
for checkpoint = 1, #checkpoints:GetChildren() do
repeat
guy:MoveTo(checkpoints[checkpoint].Position)
local reached = guy.MoveToFinished:Wait()
until reached
end
This series is amazing!! Pls keep this up GnomeCode!! your the one and onlying can know how to create tds games!😃😃
Thanks! Will do!
@@GnomeCode you are the best
@@GnomeCode yo you are the best teacher I've ever seen, go like that people like you
nvm
@@GnomeCode can you make a video showing us how to make the enemy waves great series btw
Great job, I love this so far. Thanks for your pinned comment. I would like to say however when using walk with Teddy and Zombie, for me (could be this newest version of Roblox) it does not run their animation / half runs them. I tested multiple different animations for the Zombie and it really only puts their hands out and does not move their legs (idk why) and Teddy has no changes and no walk animation even though it says he has one and it does not create any errors. Do you know if this is your animations getting outdated or not fitting the character sizes as r6 and r15s are different or what?
He says that zombie and teddy dont have animations
@@matikawaii1452 Really??
@@FakeCletus yeah you have to make your own
@@matikawaii1452 Yeah.. about that the zombie one I already have the animation but the teddy one IDK how to make one..
@@matikawaii1452 Yep already done ty.
what to do if all waves are activated at once?
If your trying to solve an issue where animations doesn’t load but there’s no any errors, the animations don’t load when you use Run Mode, so Use Play
idk y it does not work
here is my code : local function animateMob(object)
local humanoid = object:WaitForChild('Humanoid')
local animationsFolder = object:WaitForChild("Animations")
if humanoid and animationsFolder then
local walkAnimation = animationsFolder:WaitForChild("Walk")
if walkAnimation then
local animator = humanoid:FindFirstChild("Animator") or Instance.new("Animator", humanoid)
local walkTrack = animator:LoadAnimation(walkAnimation)
walkTrack:Play()
end
else
warn("no humanoid/animation folder for", object.Name)
end
end
workspace.Mobs.ChildAdded:Connect()
Ty! I was starting to worry, checkes the script and didnt find any errors, but now i Know its cuz i was using run mode, ty.
i dont know what you mean
OH MY GOD THANK YOU I'VE BEEN USING RUN FOR TWO HOURS
If you are having trouble with the collision because of the update this is the script:
for i, object in ipairs(newMob:GetDescendants()) do
if object:IsA("BasePart") then
object.CollisionGroup = "Mob"
end
end
TYSM
BRO TYSM I WAS LITERALLY ABOUT TO BLOW MY HEAD OFF
It doesnt work :(
where do i input it
@@BloonPlayshey where do u input?
theres a bug where slow enemies skip checkpoints and head onto the next one
Edit: To fix, You need to add multiple checkpoints on the same line.
just added one half way through the line
thx, it worked
*waypoints* thank you! :)
@@silviaavdala4964 I fixed it
You repeat going to waypoints
UNTIL the next waypoint is reached
this prevents skipping AND you dont gotta add extra
-no-
one of my mobs says Requested mob does not exist :(
the animations aren't working for me i tried every way .-.
same
same issue
can anyone tell me why object.CollisionGroup = "Mob" isnt working even if i replace instead of PhysicsService:SetPartCollisionGroup = (object, "Mob") they still collide, my code is
local PhysicsService = game:GetService("PhysicsService")
local ServerStorage = game:GetService("ServerStorage")
local mob = {}
function mob.Move(mob, map)
local humanoid = mob:WaitForChild("Humanoid")
local waypoints = map.Waypoints
for waypoint=1, #waypoints:GetChildren() do
humanoid:MoveTo(waypoints[waypoint].Position)
humanoid.MoveToFinished:Wait()
end
mob:Destroy()
end
function mob.Spawn(name, quantity, map)
local mobExists = ServerStorage.Mobs:FindFirstChild(name)
if mobExists then
for i=1, quantity do
task.wait(0.5)
local newMob = mobExists:Clone()
newMob.HumanoidRootPart.CFrame = map.Start.CFrame
newMob.Parent = map.Mob
for i, object in ipairs(newMob:GetDescendants()) do
if object:IsA("BasePart") then
object.CollisionGroup = "Mob"
end
end
coroutine.wrap(mob.Move)(newMob, map)
end
else
warn("Requested mob does not exist:", name)
end
end
return mob
if you named the collision group mob then type "mob" or if you named the group Mob then type "Mob" if it doesnt work then idk
it does not come out to replace their mobs get up in the place where they put it and why is that?
To people saying the animations don't work, I have the solution. There is either 2 things wrong
1. You're running instead of playing (local script = client side, running is server side) (ALMOST ALWAYS THE CASE)
2. You've incorrectly typed the script
I'm having a trouble with slow enemies. When they move, they don't fully get to the waypoint. How to fix this?
it does not come out to replace their mobs get up in the place where they put it and why is that?
This is a really helpful series thanks so much.
Glad to hear it!
For those with none or only one mob animating with custom animations:
1. Set the animation priority to ‘Movement’.
2. Under the ‘Print WAVE STARTING’ add in a ‘wait()’.
Hopefully this helps 🤞
@IFeelBricky- same
have you found the solution?
@IFeelBricky-
Same
where do i set it to movement??
@IFeelBricky- same