For those who've finished the video, you've probably noticed that when earning currency (stars in this case) after finishing/losing the game, it sets the currency value in the lobby to what you earned, instead of adding onto it. At 40:05, you need to add a + sign before the = sign so the script adds the currency and not replace it. Example: data[player.UserId].Stars += stars
i dont need to do this because when GnomeCode made the datastores and the shop i watched both of them before he combined them so my script are different but they work >:)
could you help me it says Players.sup3rmariogamer.PlayerGui.GameGui.GameController:342: attempt to index nil with 'SelectedTowers' if you know the problem respond if you want please heres the script this will maybe find the problem: local playerData = getDataFunction:InvokeServer() for i, tower in pairs(playerData.SelectedTowers) do local tower = towers:FindFirstChild(tower) if tower then local button = gui.Towers.Template:Clone() local config = tower:WaitForChild("Config") button.Name = tower.Name button.Image = config.Image.Texture button.Visible = true button.LayoutOrder = config.Price.Value button.Price.Text = config.Price.Value button.Parent = gui.Towers button.Activated:Connect(function() local allowedToSpawn = requestTowerFunction:InvokeServer(tower.Name) if allowedToSpawn then AddPlaceholderTower(tower.Name) end end) end end
i was wondering about this lol, i was so sure at the end there he was gonna be like, wait why do i only have 12 stars? but then ig he fixed it first lol
I haven't finished my tower defense game yet (I just stopped at ep.14 because of my laziness but I'll continue some days I hope) but you rly helped me with scripting, this is not only a series where you copy/paste the script, it's well explained and simple, so it's not that hard to learn Great job and thank you for this serie !
I highly suggest watching the "What's next?" chapter in the video for those asking in the comments for Gnome to create some new ideas. Roblox is about creativity, and you always have helping sources like more of Gnome's videos and the devfourms.
The day has come, the series has ended. Thank you, gnomecode. You thought me things that I can't do it myself. It's a fun series and a wild ride. Can't wait to see what next :)
Well, I have to admit a few things, I'm Brazilian, so I didn't understand many things, but even so, you helped thousands of people, I'm sure a lot of people met you and started watching you with this series, even though they reached " end", I will always remember how much it helped me, especially to understand programming logic!, with what I learned, I created several games and... Well, that's it, thank you very much for helping us!
This is for anyone who wants the health to show when mouse is hovering over the mob. First create a boolvalue in all the mobs you have and name it, "CanHover". then add a text label in the gui and you don't need to name it anything. Edit as desired then add a local script inside and paste this into the script. local player = game:GetService("Players").LocalPlayer local mouse = player:GetMouse() mouse.Move:Connect(function() script.Parent.Position = UDim2.new(0, mouse.X + 10, 0, mouse.Y + 5) script.Parent.Visible = false local target = mouse.Target if target and target.Parent then if target.Parent:FindFirstChild("CanHover") then script.Parent.Text = target.Parent.Name .. " Health: " .. target.Parent:FindFirstChild("Humanoid").Health script.Parent.Visible = true end end end)
@@roblee911 Are you talking about the health bar on top of the head on episode 11? If so, delete anything in any of the scripts including that. Make sure you delete the right things, if you do it will break the scripts. Contact me back if that works. Or you can make the health gui transparent for the mobs.
If you are having an issue with it not saving or only saving rarely, add a wait time of 2 seconds in the BindToClose function at the top of it. Hope this helped :)
@@cobaltzero a classic roblox style rpg to be exact not the ones like genshin impact its just the old good sword PVE game with bosses that once conquered roblox genres in 2014-2017
I understand the game is done along with the series, although if you ever come back to this I have some suggestions (really only 1): Party System: Go into an elevator, select the map/mode you want
You really should make a continuation of the series that show us how to make types of towers like: Explosive towers, farm towers, boss sound, monsters that spawns more npcs, etc. :)
maybe you could create a tower and remove all configurations and add a script in it wheres it gives you money each wave, although that would terribley go wrong so maybe add it in the tower module script?
@@xkiwi3065 If you want to make a game you should learn to script by yourself, not just rip everything off youtube. A tutorial is just to get you started.
These series sure have tought me alot. They really mean ALOT to me GnomeCode. Thanks to you, thousands of people can get better at coding and making games! 42:50 - you sure did. I made status effects for enemies myself already, thanks to you! (slowness, armor, flying, camo...) Just.... thanks Gnomecode. Thank you. Edit: Please stop asking GnomeCode for more mechanics to this game. The series are over, and you should be trying things yourself like I do. Belive in yourself
could you help me it says Players.sup3rmariogamer.PlayerGui.GameGui.GameController:342: attempt to index nil with 'SelectedTowers' if you know the problem respond if you want please
@@a_person7815 I just made configuration folders for enemies, with bool values for "Flying" and "camo", then for towers just same but "CanHitCamo" and "CanHitFlying", and then in tower attack script I added function to check if enemy is flying or camo and if tower can attack it amd if it cant it ignores the enemy. Or something like that. I hope you understand, if not then sorry Im not too good at explaining.
@@superyanyan8373 It really depends on ur code, my game was telling me taht all my towers didnt exist cuz I misspelled the names. Can u please write that line of code here? I dont know what ur line 342 looks like
@@Fun_stickman heres the script maybe this will help local function DisplayEndScreen(status) local screen = gui.EndScreen if status == "YOU LOST" then screen.Defeat:Play() screen.Content.Title.TextColor3 = Color3.new(1, 0, 0) screen.Content.Subtitle.Text = "atleast u tried" elseif status == "VICTORY" then screen.Victory:Play() screen.Content.Title.TextColor3 = Color3.new(0, 1, 0) screen.Content.Subtitle.Text = "nice you won" end local info = workspace.Info local money = math.round(info.Wave.Value / 2) if info.Message.Value == "VICTORY" then money = 15 end screen.Content.Title.Text = status screen.Stats.Wave.Text = "Wave: " .. workspace.Info.Wave.Value screen.Stats.Money.Text = "Money: " .. money screen.Stats.Kills.Text = "Kills: " .. Players.LocalPlayer.Kills.Value screen.Size = UDim2.new(0,0,0,0) screen.Visible = true local tweenStyle = TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.InOut, 0, false, 0) local zoomTween = TweenService:Create(screen, tweenStyle, {Size = UDim2.new(0, 298, 0, 205)}) zoomTween:Play() local events = ReplicatedStorage:WaitForChild("Events") local exitEvent = events:WaitForChild("ExitGame") local clicked clicked = screen.Leave.Activated:Connect(function() screen.Visible = false clicked:Disconnect() exitEvent:FireServer() end) end local function SetupGui() health.Setup(base, gui.Info.Health) workspace.Enemys.ChildAdded:Connect(function(enemy) health.Setup(enemy) end) info.Message.Changed:Connect(function(change) gui.Info.Message.Text = change if change == "VICTORY" or change == "YOU LOST" then DisplayEndScreen(change) end end) info.Wave.Changed:Connect(function(change) gui.Info.Stats.Wave.Text = "Wave:" .. change end) cash.Changed:Connect(function(change) gui.Info.Stats.Cash.Text = "$" .. cash.Value end) gui.Info.Stats.Cash.Text = "$" .. cash.Value end gui.Towers.Title.Text = "Towers: " .. placedTowers .. "/" .. maxTowers local playerData = getDataFunction:InvokeServer() for i, tower in pairs(playerData.SelectedTowers) do local tower = towers:FindFirstChild(tower) if tower then local button = gui.Towers.Template:Clone() local config = tower:WaitForChild("Config") button.Name = tower.Name button.Image = config.Image.Texture button.Visible = true button.LayoutOrder = config.Price.Value button.Price.Text = config.Price.Value button.Parent = gui.Towers button.Activated:Connect(function() local allowedToSpawn = requestTowerFunction:InvokeServer(tower.Name) if allowedToSpawn then AddPlaceholderTower(tower.Name) end end) end end SetupGui()
and gnome I was there from the start of it all thank you for this fun series its been a blast unfortunately its the last episode I have fun with you along the way 👌👌
It always comes to an end. And that is the end for this series. I really appreciate this series. But what I have to say about people asking for tower/ enemy abilities is that I recommend you to learn it yourself and from your mistakes.
youre right, but I tried figuring it myself and still cant get it to work after hours lol, i asked the discord community but all they did is trolling and call me stupid lol
@@@GnomeCode it wont add the stars it will replace the stars with the old soo like i had 12 in shop after a game it rewards me with 16 right in stead of adding 16 it replace the 12 i had to 16 idk how to fix
Kinda sad that this was the last episode, wish he wouldve gone over stuff like enemy attacks or explosive/spread towers, also especially gamemodes so its not always bland
this is by far the best roblox Tower Defense tutorial on youtube as of now, GnomeCode's way of explaining how to make the game is easy to understand and I can see a bunch more TD games being made because of this, in fact im working on my own TD game, using this tutorial, not sure if itll turn out how I want it but ill try to
something I wish he did was how to make different difficulties so that its not always the same enemies (an idea I had was to make multiple elevators for each difficulty that send you to a separate game so the enemies are different without having to make it switch between wave formations depending on the difficulty that gets voted for)
Well find a tutorial on yt on how to make voting system there should be a line in the tutorial when option 1 win it activate something, so make a bool value and parent it to workspace example "Eazy Mode" turn it on then make another bool value for other modes but turn it off, go to waves script then go to the line where it spawns zombie, say at the top of line where spawns zombie. if workspace.EazyMode.Value == true then, like that
Thank you so much, this was one of my first games, and with the help of my friend, we made it the best one i made too. I really loved the idea of my own tower defense game, and you made that happen. Now we are adding towers with custom abilities, and adding more features to it
it makes me so much Fun to see and learn and to make u series,s your the best youtuber who showing how to code and stuff like that thank god that i found u in 2021
nah they easy except your talking about ones like genshin impact roblox classic rpg are easy to make and once was popular years ago (2011-2018) what i mean by classic is you kill enemies to get weapons drops (no inventory looting thingy that will ruin the classic) and level up and unlock new areas and fight bosses till the game ends you cant do no more one of classic roblox rpg games are: 1. Infinity RPG (still alive and updating) 2. The legend of the bone sword RPG (alive and still updating) 3. legendary sword RPG (dead but its fun except for the massive amount of bugs due to it being outdated)
@@souless-fu8vd Still don't know yet, I was just finishing the base scripting first before I design or polish anything. If you have any ideas for what theme I should go for, please tell me!
Wait! Please don't stop! I have an idea for the game! Add Difficulty choosing! Like TDS! When you join you can vote the difficulty! Also add an badge for beating every difficulty pls (You can get 5 for free) Edit: Am like the 10th person to see the vid Edit2: Pls stop being rude in the replies :(
This has been a great month for me, definitely will check out the other series too! My tower defense is ready so thank you! Your coding will help so may more beginners than just me. I AM sure
You may not see it but thank you GnomeCode for all the support on the game. Without you, I wouldnt be able to make a tower defense game and learn some things about coding in the process. Thank you so much ^^
Thank you so much for the series, as i jave enjoyed, and used, these tutorials. Pls keep making new tutorials as it would nale me, and several others, very happy. Have a great day :)
You are an amazing game creator. Instead of copying and pasting the script, they let me explain it directly to them as I typed it. I'm still stuck at tutorial 3 (lol), but I think you'll be able to create a tower defense if you read this tutorial. The first part of the sentence may be wrong. I'm Japanese :D
This series were awesome! I hope you do more series like this. I still have a hope that someone releases an uncopylocked file for the people who have troubles with coding this.
I know that this is "The Final Episode" and I have been loving this series, but I was wondering if you could make a video on how to make events and different kinds of money
I've learnt so much more than just how to make a tower defence game from this a few months ago I watched gnome's teddy tutorial, spent hours on lore, models songs maps, just to fail with remote events. I've learnt to overcome the 3 times my code was broken for days in this series, and I think I can start to fix the other game as well from this. truly I think I thank gnome for helping me mentally I guess, and for the tower defence game too.
Sadly I didn’t get to see how he you would use game modes or game modes voting system/a final boss, But a las a great series! Thank you I learned so much from this! I even watched every episode!
Amazing series man! Do you think you can do a tutorial on advanced movement using lerp and camera CFrame bob? I'm really interested in how games do really cool movement systems in where the character sorta leans into movements and such. For example, Apeirophobia has a really awesome player camera system.
@@GnomeCode Sad its over, I’m not quite smart at all and I still can’t fix the towers I want to shoot fast without getting a stack overload whilst spamming functions.
@@LocalFloorPisser The task.wait() is how long the cooldown is, but if i set it to the task.wait for the cooldown, it still fires too fast therefore spamming a bunch of fast firing towers wont work
You could make enemies that stun towers making them unable to attack for like 3 seconds and make an explosive tower! Thank you for everyting GnomeCode!
I followed the whole serie with my son to build a TD game, it was really a fun experience and you've got a great talent to make the scripting accessible! Fixing the errors is really the best part! Thank you so much. I was really happy to enter his Roblox world, and introducing him to programming - not just as a user experience.
FINALLY! AFTER 10-12 DAYS IM DONE! I can finally make more towers like cliff freezing towers, more maps, more waves, and etc. this is truely a good tower defence totourial
Could you do a simple tutorial on how to make a round-based zombie survival game such as "Project Lazarus"? I'm having difficulty getting the round and zombie system to work and haven't found any videos on similar subjects. Great videos by the way.
i thought the series was over, boy was i wrong thanks gnome code this was my first time actually trying to code seriously, its really taught my a lot about more advanced scripting in roblox
For everyone who wants to fix the mob cutting through waypoints if it is too slow just use a repeat until loop like 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() map.Base.Humanoid:TakeDamage(humanoid.Health) end
wow, this was amazing, I loved learning to script thru this series, though I can't figure out 1 thing, how would I make the shop for towers separate to where you equip then and make the towers able to play 2 different attack animations