Wave Based Attacks - Tower Defense Tutorial #2
Вставка
- Опубліковано 19 чер 2024
- We continue our Tower Defense series by taking our single zombie and incorporating him into a wave based fighting machine!
DISCORD ► / discord
TWITTER ►@gnomecodeRBLX
TIMESTAMPS►
0:00 Intro
0:36 Creating module scripts
2:58 Creating simple map
4:37 Spawning Mobs
8:34 Moving Spawned Mobs
9:53 Spawning a Wave
10:30 Moving in unison
16:45 Zombie Factory
17:18 Delaying each wave
19:30 Outro
I like how he doesnt just create tutorials and tell you how to do things... he teaches you as well and shows you common mistakes people do. thats awesome
Did you just say “do do”
But whit the videos you can do a tower defense games?
@@restinpeacekilo yes to do*
@@UltimanteTheCool you should edit and change it to "to do"
ikr, this guy is so underated
Omg this has been such an adventure I'm starting to get the hang of scripting in Roblox studio, but you have been there for me forever almost I've been watching videos like these forever thank you so much for helping everybody with these videos!
he is good guy
You're right!
I like these kinds of videos cause i can see the progress from a simple baseplate to a functioning game, im not even a developer
To everyone who's mobs arent spawning:
1. Check if you have a map folder. In this video, the folder name is "Grassland" and there should be 3 main things inside: "Path" folder, "Waypoints" folder, and "start" object.
2. Check if you have "start" in your "Grassland" or map folder. The "start" object can be anything.
3. Check if you put the "zombie" or enemy inside a "Mobs" folder in the ServerStorage.
Everything I did Correctly but It don't spawn In.
i got everything right its still wouldnt spawn the zombies
Bro, I found out why, If you have the Zombie called Drooling Zombie, Just Rename it to "Zombie" With a Caps Z@@Baguga.
man i have no idea then mine works just fine
@@arkin2263 how?
U need more subs man, this stuff is so helpful
started to play alot of td games so thanks to your td tutorial series I might be able to make my own! :D
yes
Sey
Ice wanted to for a while lol
I love how its really basic and easy to learn, i love it
Thank you so much GnomeCode, you have one of the best tutorials to make TD games. This all worked all because of you Thank you so much!!
So can u pls type the mob script in here just for me is it not working and im trying like 3 hours 😅it would be great when u do this
So apparently this does not work in newer versions based on the experience the newer people are having
@@jasontek6638 this tut is not MEANT for newer people. you need to not be new to learn this. you have yo at least know the basics
You are a really good coder keep up the good work!
How do I fix this "ServerScriptService.main.mob:9: attempt to index nil with 'CFrame'
I love these tutorials! Please continue uploading videos like these.
nice profile picture
the thing i hate about them is he dosen't explain errors. I did everything and it wont work i even copied the code didnt work
@@HeyitsXR2LIVE the only problem i have it that it moves to fast
@@Bro-vs5mk i find it helpful every time he writes a new line to pause and write, it does take awhile but it works
@@ShadowDragon-hb3yv yeah
This series deserves a sub :)
genuinly this is the best tuturial ever
really helpful, this entire tutorial so far has been going great and it looks very promising, and everything works really well. Thanks!
ive noticed i actually started to understand how to code, this series made me wanna start making games and i when i tried i just copied the code he gave me and had no idea what to do, these days i actually understand what they do which is making me proud
How do I fix a script timeout
@@Neshy_YT
@@MMGProductionss
if your doing it in "while true do" (havent watched the vid) you can put wait() at the end and it should fix it
Great Series! (Subscribed after first video!)
do u know how to fix this? HumanoidRootPart is not a valid member of Model "Enemy"
@@SkibidiUniverse24 first off, you have to go get some better common sense
secondly, learn how to rig models
third, its fixed
nothing else
Best tutorial i ever seemed
I and others appreciate you taking your time to do all of this GnomeCode, you're a godsend man.
the script doesnt work
@@boogernnboogie6838 Yes it does check the output of there are any errors
@@huller1041 same, for me it just warns me that the mob doesn’t exist even though i have his exact code
@@huller1041 i’ve tried 4 times though and no fix
@@huller1041 Ok ty bro
really high quality tutorial and i learnt a lot. Also his basic tutorial is really in depth
Thanks so much! it helped alot
tysm bro after i do this game i will wach other tutorials!!
Woah, this is nice; i'm new to scripting and i always wanted to make a td game for like 7 months but never actually finished / released any of them, i tried 2 times and discontinued the first one because i was stuck on the wave system, thanks a lot for this video
bro same:D im glad gnome did this series
yeah same im working on one rn
@@SomeGameDeveloper whats the name? ill play it
Im also new to scripting. I am learning.
I love how u cleanly coded everything! Just perfection!
the best teacher in whole world, i love your videos. You making amazing job
Man, this guy is very good tutorial maker😇
This series is really great! Unlike other tutorials, when I run into issues, I can fix them easily! Not only that, your explanations and scripts are really simple and easy to understand.
In 13:21, its instead of identifying the humanoid, it identifies something named humanoid(which doesnt exist) in humanoid. Help?
@@verybasicchannel did you do mob:WaitForChild("humanoid") or did you do mob:WaitForChild("Humanoid")
@@10szym44 what of this variants is good?
Bros, please someone help, without help, I can not continue to do this project..., My zombie DOES NOT MOVEMENT!, he spawns alone, and is completely inactive. Also, tell me how to call the table at the bottom of the screen, which shows your last actions ?
Please kind people, help to deal with the problem, otherwise the game will not live, all hope is on you.
@@donaterplays5276 its mob:WaitForChild("Humanoid")
10:06 saving my time, Awesome tutorial!
i never noticed the orientation indicator! Thats gonna be so useful for some upcoming games!
This is my second video and I'm learning so much!!! Thank you for the tips, it helps me get one step closer to my dream of becoming a famous developer!! YOU DESERVE MORE SUBS
Hope you succeed!
Your incredibly easy to follow along, thank you!
Incredible "Easy" huh? When I ran the game at 10:12 the zombies didn't spawn! So much for "Easy"
@@IdkLukas The code may be old at this point; I followed along perfectly, even rewatched a few times, and the zombies don't spawn.
@@m4urivfx Same
Except for when you get a million errors and realise that you've made a dumb mistake
@@IdkLukas for me its working
if at 10:40 the mob doesnt move when spawned change
function mob.Move(mob, map)
local humanoid = mob:WaitFirstChild("Humanoid")
local Waypoint = map.Waypoints
for waypoint = 1, #Waypoint:GetChildren() do
humanoid:MoveTo(Waypoint[waypoint].Position)
humanoid.MoveToFinished:Wait()
end
to
function mob.Move(mob, map)
local humanoid = mob:FindFirstChild("Humanoid")
local Waypoint = map.Waypoints
for waypoint = 1, #Waypoint:GetChildren() do
humanoid:MoveTo(Waypoint[waypoint].Position)
humanoid.MoveToFinished:Wait()
end
Your welcome
teach me:)
you just saved my freaking life thank you so much
it does not work for me
bro it works LOL and it looks so fun!
I love your tutorials, they are very helpful, and help me learn to script!
it doesn't work.
my friends are trying to make a tower defense game after tower battles is being discontinued. thank you for this awesome series !
WAIT WHAT
@@z0rreal11 yep planet got a career therefore its discontinued
@@unitedstatesofasparagus9758 bro thats why i am here
@@unitedstatesofasparagus9758 yeah... );
thx very much for this video that was the last thing for my game😀
great job
Noah's Archive recommended you during a stream to help me script my game, I'm not disappointed.
Thank you alot for teaching me how to script
Woah cool shout out. Welcome aboard!
@@GnomeCode hey, my script won’t spawn the zombie and it says it doesn’t exist
@@Penguinza just rewatch it and make sure u haven't done anything wrong
@@HR_DL my code is *pretty* similar
@@Penguinza check to see if all your parts are named right and in the right folder
Amazing job on the tutorials, Keep the amazing work up!
amazing make game !! thank you for tutorial ^^
Without this guy I wouldve probably failed making a tower defense game
I love playing tds games and this was the only one that was clear and helpful to make one, so thank you for helping.
Tysm I'll make sure to add credits
This took me 30 min so here:
Mob Script:
local ServerStorage = game:GetService("ServerStorage")
local mob = {}
function mob.Move(mob, map)
local humanoid = mob:WaitForChild("Humanoid")
local waypoints = map.Waypoints
for waypoint=1, #waypoints:GetChildren() do
humanoid:MoveTo(waypoints[waypoint].Position)
humanoid.MoveToFinished:Wait()
end
mob:Destroy()
end
function mob.Spawn(name, quantity, map)
local mobExists = ServerStorage.Mobs:FindFirstChild(name)
if mobExists then
for i=1, quantity do
task.wait(0.5)
local newMob = mobExists:Clone()
newMob.HumanoidRootPart.CFrame = map.Start.CFrame
newMob.Parent = map.Mob
coroutine.wrap(mob.Move)(newMob, map)
end
else
warn("Mob not found:", name)
end
end
return mob
Main Script:
local mob = require(script.Mob)
local map = workspace.Your map --- Put your map name.
for wave =1, 5 do
print("WAVE STARTING:", wave)
if wave < 5 then
mob.Spawn("Zombie", 3 * wave, map)
elseif wave == 5 then
mob.Spawn("Zombie", 100, map)
end
repeat
task.wait(1)
until #map.Mob:GetChildren() == 0
print("WAVE ENDED")
task.wait(1)
end
mobs wouldnt spawn
Thank you i highly appreciate that
ty
@@watkj7 Same
in line 24 you made it map not map.Mob
Gnomecode when you will make the lobby of this td tutorial? Like how to make a shop for buying towers you get it if you played tower battles or other tds game in roblox
Edit: i never got 9 likes on a comment, thanks
this is the second video slow down buddy
The hardest part
idk if you watched yet or not but he made that
ok last vido out now its okey @@RichRBLX
aha i have@@Blue-Square
2:15 map script full build
2:48 main script full build
4:36 main script full build part 2
6:16 mob script full build
7:17 mob script full build part 2
9:39 mob script full build part 3
10:08 map script full build part 2
10:50 mob script full build part 4
12:19 mob script fix full build
13:19 bit change of mob script
13:42 map script fix change
14:32 bit fixes
14:46 changed map script
16:34 map script part 3
18:32 wave script fixed
thx bro
This really helps so much bro thank you so much
thx so much
I have successfully created my game, it’s called bathtub tower defense
@@HaiderRBLX for me the zombies won't spawn in after 9:59 any idea on how to fix that all the words mob in the mob script are underlined
HELLO MY FELLOW GNOMES
never gets old *sniff*
I’ve really enjoyed this series… It will really help my tower defense game. If I ever need help this is definitely the channel. Thanks GnomeCode!
How is you're Tower Defense Game called?
Tower Defenders
@@fierzy_new lies
@@janahari6701 mispelled some stuff
Dude, chill
Hey GnomeCode love this series so far. I have noticed the zombie does not spawn in the spawner and I see I am not the only person with this problem. If you could make a updated version or comment back the newer script that would be great! Thank you. :)
I’m having this exact same problem. I just hope somebody knows how to fix this.
Does it say "Start is not a valid member of Workspace "Workspace""
Edit: i redone this part but my friend deleted the game
@@aaaaaaaaaaa.a not for me, no.
make sure the spawn part is anchored and CanCollide off
if so, move that spawn part into your map name folder, and go to the mob script.
at 7:18, you can put the code he uses
im new to scripting too, so hopefully this works for you
I think it’s because Roblox studio has updated
Yo GnomeCode part 1 was not Hard and i liked that but Part 2 uhhh it shows me an error is there any way u could help me fix it it says ' ServerScriptService.Main.Mob:9: attempt to index nil with 'CFrame' i really wanna make a Tower defence game but thanks for the tutorials they really help me
just put map where you said the map name.
Hey! I love scripting and im trying to learn as much as possible and this really helps me get inspiration and gets me more into developing! Thank you so much for every video! Right now I'm trying to learn CFrames a bit more.
Great video though!
Keep up the good work!
Gnome Gang Forever!
Edit: Fixed some missspells.
Ok
Great to hear!
@@GnomeCode answer me pls
@@GnomeCode I was wondering if you are able to make towers and make them animatable?
If you do please make a video about them!
I really need it for my tower defense game
@@EvertOfficial It wouldn't be a tower defence game without towers! They'll be coming in the series soon
its awesome how instead of just telling you what code to write he shows what mistakes people make and how to improve them
this is what everyone says but its true
It's normal that at 10:50 I have the same code as you but it don't wants to move ?
I did this with another mob. So It's correct or not ?
same with me but i did the same as him but it didint work
For me too.
Me too
same
same
tysm for helping me with tower defense game you are my favourite builder youtuber
when he calls me a fellow gnome it makes me happy
same
At some point in this series (probably the last epsiode) you could show how to make multiple maps and a way to choose which map you join (the two most common being matchmaking or elevators) aswell as other QoL features like wave skipping.
Thanks Gnome!
P.S. If your looking for reference, I would recommend Tower Battles, Tower Defense Simulator or Tower Blitz.
I'd rather a gui matchmaking, but an elevator would be nice too
Elevators are good but I hate when random people join the match
@@zarsty3648 how about global matchmaking
jk its extremely complicated
Tower defense games that teleport you to another server are stupid, it should all happen in the same game
the crux of the game (the td part) in a seperate game is far more sensible, keeps chat peaceful, less player lag, and it means you dont need complex trigger mechanisms so that a "game" doesnt start in the middle of the lobby
If the walking path is messed up by having a different walkspeed, just put another waypoint before the waypoint that you are having trouble with.
How do I fix this "ServerScriptService.main.mob:9: attempt to index nil with 'CFrame'
you are a hero
10:34 i’m having trouble, get children is not a valid member of folder workspace.Grassland.Waypoints any help?
like 8 of the mob script
Its a Banger Video with all this Explaining and helpful stuff. My Problem is just that i cant spawn them cause it calls some kind of Nil Value
Solve from zombie spawn: if module script is named Mob name all the mob Mob with cap M like this: local ServerStorage = game:GetService("ServerStorage")
local Mob = {}
function Mob.Spawn(name, map)
local MobExists = ServerStorage.Mobs:FindFirstChild(name)
if MobExists then
local newMob = MobExists:Clone()
newMob.HumanoidRootPart.CFrame = map.Start.CFrame
newMob.Parent = workspace
else
warn("Requested mob does not exist:")
end
end
return Mob
you can copy and paste that
I will test it
Dont worked
@@RODRIGOOBOSS first the module script need to be called Mob and you need already the start part
@@Da_Dog1010I already solved the problem I googled and found a reddit that gave a script and it worked. But now I don't know how to destroy the npc at the end because when I put the reddit guy's script the npc was already moving. Can you help me with this problem?
@@RODRIGOOBOSS i dont know now because im stuck in collide part 3 and cant remember
this series is really good! better quality than any classes!
When yours doesn't work but you still support the creator for making awesome content and helping other people so you subscribe
i have a question, when i got to the part where the part spawns in the zombies, it always says your module experienced an error while loading, can someone help me?
The coroutine is giving me error messages and I cannot figure out how to fix it. Ive tried looking into coroutines online and even if ive read the solution my implementation of it did not fix. is there anywhere else i could go to get assistance? the error message is " invalid argument #1 to 'wrap' (function expected, got nil) "
I need help, in main when I put “wave, map” it says, “Argument count mismatch. Function ‘mob.Spawn’ expects 0 to 2 arguments, but 3 are specified. Any help?
i think u need to put wave, quanitity, map
hey just some suggestions for things that would be good for a full on tower defense game
Money that you can spend on towers and upgrading them in game (obviously)
Towers that can be upgraded (of course) (5 different levels could be good enough, and them changing appearance based on what level they are would be cool too)
A Farm tower (something that would give you different amounts of money per wave)
A support tower (like the DJ in TDS, providing buffs to the towers nearby it, and the perks getting better as they upgrade, like a small discount for upgrading)
Tower skins (things that would reskin your tower but still do the same thing)
A lobby, where you can go into an elevator or something to start a round, and also equip your different towers.
Also just something i think would be cool
Different enemies that would spawn depending on what map is chosen, like a swamp map would spawn swamp monsters, they'd all be the same at the end of the day just look different
I dont expect most of these to get in because they might be kinda complicated
I also suggest adding "Skip Wave" button to skip to another wave
OMG HAIIII! its me. your fan :D
"(Like DJ in tds)" pain, misery, agony, dread.
Tower battles is being done dirty, I literally saw someone else say like the commander from tds
@@reddeadleisure Actually, TDS copied TB
Yes it finally works!
The code works perfectly fine for me
You're great at explaining things. I'm very interested in scripts regarding combat. So far I've been using RED Plys to learn how to make a combat script, but I feel his tutorials are very hard to follow for someone who's still trying to learn. I would like to know if you ever plan on making a tutorial on combat. If you do can you make a combat script similar to RED Plys?
Kinda agree quite hard too follow
At line of code 23 in the Enemies(aka Mobs) module script it tries to call a NIL value, I have tried to change it so many times and it just doesn't work. Could you please help me? Also I replaced mob with enemy (The Code is: enemy.Move(enemy, map))
same
@@ritzed7995 same
Respect i cant make a game im so bad in this but you are god respect
Thank you!! Sr, Lets move to #3
This is awesome Gnome!! How many episode do you think this series will be or is it unknown right now?
Hey Pine Bloxx, I see you quite often xD
Unknown. As of right now I've made 2 more episodes but there's still a lot to go. We will see how much can get done before Christmas
@@GnomeCode Nice! This helps me learn a lot and I like sharing it with my friends since their TD fans, and I had a previous TD project which I decided to discontinue it. This probably will make them happy, so thank you for helping me.
""
@@GnomeCode we need TOWERS
at first i used to just copy the scripts in the description but you explain so well i can just write it
same
I need the scripts copied I keep trying to run my thing and it's not working
@@KimchiEater same
@@KimchiEater same
give me those scripts pls
hi!! i love ur vids and i'd love if you made a summoning for units!
Hi @GnomeCode, this series is great and have been working for me till episode 2#. I did everything you said with thie wave part, but the output always says "Requested module experienced an error while loading" when i run the game. It would be really helpful if you either commented how to fix it, or anyone else the solution to this.
Thank you for reading
TheGreenDino
Does this still work? I got everything working up to the part where you get the mobs to move after being spawned. I checked everything in my scripts over ten times and I have everything right but the zombies still aren’t moving after spawning.
same
No, roblox studio script never changes
i tried following along and apparently the script tries to index nil on start because my model does not have a humanoidrootpart inside so i thought i could substitute that with a part that already exists on the modele (ex.torso) instead (fixed by adding in a humanoidrootpart, however now it doesn't exist)
Same!!
me too
Make a rig
Hey GnomeCode, i was trying to do your tutorial, but when i played the map no zombies spawn how do i fix it?
same
10:10
my zombies dont spawn bro, like not even 1 zombie.
What seems to be the issue?
Same
Can we just appreciate how much times he spends just to teach us
I'm not gonna make a TD game with his vids but I'm watching for fun
OMG NVM IT WORKS!!!! IN MAIN, FOR THE END OF IT "MAP" get rid of the quotation marks. Double check for spelling and exact words!
for anyone who didnt know to copy and paste at 8:51 heres the script:
local zombie = script.Parent
local waypoints = workspace.Waypoints
for waypoint=1, #waypoinnts:GetChildren() do
zombie.Humanoid:MoveTo(waypoints[waypoint].Positio)
zombie.Humanoid:MoveToFinished:Wait()
end
you mispelled the #waypoints part
How do i make models without the humanoid part move around the track?
TweenService
Can We All Enjoy the effort this man put into this video for all of us so can we all like his videos
Lets appriciate for this guy's comment for not supporting the channel and gets likes
The most underrated youtuber
Yeah
Hi, think you might remember me, I came across your channel when you still had below 1k subscribers.I really enjoy your content and I hope to see you progress in your youtube channel and career,
All of these videos you've made have inspired me to learn scripting
(well I still really can't, cause I have a very smooth brain) and learn other stuff as well.
Please continue to make good content and inspire others to get into development.
Thanks for dropping by with the kind words, really appreciate it. If you're looking for a more gentle introduction to scripting I'd recommend checking out my 'First Game' learn to script series.
@@GnomeCode hi gnome I can’t get the CFrame bit to work it says CFrame index = nil or something
@@wistygg9268 What you want to do is put the start part into the grassland folder
@@MagicMystro can you help me with something? in the output it says Requested module experienced an error while loading - server - main:1
and the zombies arent spawning in
@@GnomeCode need help my zombie wont spawn
Listening to the output really does help when something is broken. May take a couple of minutes to find the problem.
to everyone saying it dont work i have said that and i have had to relax once i relaxed i watched the video in detail and copied and it worked perfectly fine i will not be providing script as u will not work hard and u need that mindset for a game
Can anyone help me with something? Instead of the zombie model I used an normal rig I did everything but when I test it it says to the output "InsertService cannot be used to load assets from the client" pls someone help me, i am new and i have no idea what do i have to do.
you can also animate the enemies through the module
so you dont have to make animate script for every enemy
How
@@MK8Warrior 1 year old post, but I now use another enemy system to animate, with 1 single localscript.
@@lukiValent what’s the script?
@@MK8Warrior I made it myself for my game, but basically when an enemy is spawned server-side, it is just a stud. When the client receives the newly created enemy, it will give it its enemy model and animate the model. I'm using the OnChildAdded event to replicate the enemies on client.
Is your game finished? If so could you help me@@lukiValent
at 0:42 for him it shows service script but dosent for me on roblox studio. why is this?
You have to add it before you start
Am I too late?
My Error says Requested mob does not exist ▼ {
["Move"] = "function",
["Spawn"] = "function"
} - Server - Mob:22
please help!
hey there i need help,
so my zombies are not spawning and output says mob does not exists tho i try to do it again, but the #waypoints is to shown as red underlined
I need help I rewrote the script and checked it over (the mob one) and the zombies still aren’t moving I need help I’m desperate plz
Btw I’m on the moving in unison one
@@hambugha21 im stuck on te part where it spawns 3 zombies, mine only spawns 2, the last one only has a humanoid in it. no body
If you're zombie isn't moving there is a possibility that you missspelled or missplaced a folder or model. if you're getting "Waypoints is not a valid member" error. you might have misspelled your "Waypoints" like i did or misspelled you're map
do you know the fix to this? having that error on line 9 for the waypoint
I have the same problem. But nothing's wrong
why is this not working??
I literally can’t figure out the problem WTH
@pots6254 I did like 2 seconds ago, check if in line 9 and 10 you have humanoid 2 times. if yeah, remove it, so it's
humanoid:MoveTo(waypoints[waypoint].Positionhumanoid.MoveToFinished:Wait()
(position has a ")" on the end, but youtube comment inallowed it
@@AbramsTheFox1 Thank you for solving the problem. Mine is fixed
I changed the zombies name to (HUMANOID) caps and all and it finally started spawning multiple also in main (mob.Spawn etc) needs to be *mobs not mob* and it will access (mobs) folder because mob is not a folder (I had this problem for about 4-5 days and im happy i [the noob] fixed it) thanks GnomeCode
it still didnt fix :(
love you so much
Nothing won’t spawn in I checked the script if I had a script error but everything was fine and I did all of the things you said. Please does anybody know how to fix this?????
I'm having the same problem... can someone help?
Ayo Gnome, Just a question in a upcoming episode like 4 (since you probably recorded episode 3 by now) will you add modes? like normal and hard mode?
Hey Gnome! I am using an alien as my mob instead of a zombie, and around 10:00 when I try to spawn in multiple of the Mobs, it only spawns one.
EDIT: I figured out it was an error with the model I was using, solved it!
How do you get them to move :(
@@FrostyGT I would just double check your script, but for me once I switched my model it worked fine!
tell me how it doesn't work for me too
@@The_Real_Mini Like I said just try using a different model. Make sure that it is not anchored. It took me some time to find the right model, tell me if you need any more help
my zombies spawns but it does not move@@Griff_FN
Gnome i dont know how to fix to the zobmie spawn (6:57) i will be happy if you help me
it says Requested module experienced an error while loading. in ServerScriptService but i literally have the same scripts, maybe its outdated? idk can you help
Friends, I solved the problem of Zombie not appearing :)
code for Mob
local ServerStorage = game:GetService("ServerStorage")
local mob = {}
function mob.Move(mob, map)
local humanoid = mob:WaitForChild("Humanoid")
local waypoints = map.Waypoints
for waypoint = 1, #waypoints:GetChildren() do
humanoid:MoveTo(waypoints[waypoint].Position)
humanoid.MoveToFinished:Wait()
end
mob:Destroy()
end
function mob.Spawn(name, quantity, map)
local mobExists = ServerStorage.Mobs:FindFirstChild(name)
if mobExists then
for i=1, quantity do
task.wait(0.5)
local newMob = mobExists:Clone()
newMob.HumanoidRootPart.CFrame = map.Start.CFrame
newMob.Parent = map.Mob
coroutine.wrap(mob.Move)(newMob,map)
end
else
warn("Requested mob does not exist:", name)
end
end
return mob
code for Main
local mob = require(script.Mob)
local map = workspace.Grassland
for wave=1, 5 do
print("Wave starting:", wave)
if wave
mob is not a valid member of Script "ServerScriptService.Main"
i put ur code but the zombies dont spawn and i did everything he told me to do (gnome) but it keeps showing this error "Mob is not a valid member of Folder "Workspace.GrassLand"
@@williammega2626put whatever you named the module script into (script.mob)
Example :
Name of module script : Mob
So i put in Mob in (script.Mob)
Capital letters matter.
@@awesome4823Is it the main or mob script?
@@FPFPFPZo for me its main