Tower Defense Game Creation

Ok, so I’ve wanted to make a Tower Defense game on Roblox since the day I started developing. Over time I became a decent modeler and animator. Every time I’d try to make a Tower Defense game, I’d usually quit after I’d gotten the models done. Why? Scripting. I’m horrible at scripting. I’ve tried to learn it, but I have a lot of issues with keeping it in my head. Anyways, to the point of this whole topic:

I want to create a Tower Defense game, but I don’t know where to start. I know that I need to model and animate enemies and towers, and that I need to script currency systems and gameplay systems. So, where would you recommend I start?

The second issue is the actual scripting part. If anyone has any tips or helpful links I could use to find ways to make tower placement systems, along with a shop for towers and possibly even skins, that would be amazing. I’m not asking for a poop-ton of scripts, just helpful articles and links I can use.

Here’s a list of the things I’m considering making:

  • Tower Shop (In the Lobby)

  • Tower Placement System (Includes costing money to place, getting money back from selling) (In Gameplay)

  • Skin Shop for Towers (In the Lobby)

  • Server Creation Mechanics (Creating Parties with other players to play in a game with) (In the Lobby)

  • Script For Spawning Enemies (In Gameplay)

  • Script For Rewards (Reward amount depends on how far the player(s) got in the game)

  • A multi-place system (A system that could quickly transfer the player(s) from the lobby, to a game. This would also mean I’d have to connect datastores from one game to another to do that.)

Finally, I want to ask if the project is worth the time. I’m not in this specifically for Robux. I view monetary income from games as a side benefit. I am doing this purely for fun, but I’m scared that I’m just going to quit half-way through. I always worry about players. I’m not very wealthy when it comes to Robux, so I don’t really have a source of advertisement. In the end, I’m simply asking if this project is worth it?

TL;DR: I want to make a Tower Defense game. Don’t know where to start. I’m looking for helpful tips on scripting mechanics of the game. Is it worth the time?

Sorry if this seems like a lot. I have so many ideas, but always have trouble bringing them to life. I feel more confident in this idea than the others, so I really want to go all out.

9 Likes

Because your not starting small, if you start a big game with like little programming knowledge you would quit it at the end, start at smaller projects and when you think your ready you can try

3 Likes

Unfortunately I can’t spend too much time sitting here writing a entire script for you, but I can explain a few! Please don’t just copy and paste these though, they’re just a guide for what you should do. I would also suggest not creating this though without being/hiring a scripter, as you won’t know how to fix any bugs when they stick their ugly face out :expressionless:. I’ll go ahead and apologize for the bad syntax :blush:


Assuming you already have a inventory system set up you would have to insert a local script into the purchase button that would like this:

--Make sure that your inventory system consists of a folder that you can add on to.
script.Parent.MouseButton1Click:Connect(function()
 --fire a remote event
end
--In a server script do
PathToEvent.OnServerEvent:Connect(function(player, TowerName)
 local newTower = Instance.new("StringValue", player.Inventory)
 newTower.Name = TowerName
 newTower.Value = TowerName
end
--You would then want to make sure in your inventory system that you have a script checking the children of the folder. It would look like this:
PathToPlayer.Inventory.ChildAdded:Connect(function(child)
 --clone, edit, and make a functioning frame in the inventory UI
 --in other words, do stuff :D
end

That’s a summary of what you would do for the tower shop, and a little on a tower inventory. A skin shop would be similar to this though it would also check what tower the skin is for.


This one I do not know how to create. Though don’t worry, I have not quoted you just to state I don’t know how to create it :grin: I actually know a great module called MatchmakingService! In the devforum post it explains how to use it, and the creator is a great guy and answers almost all questions you ask him about it :upside_down_face:


I bet for this one you can just create a module that looks similar to this one

local module{
  ["Round1"] = {Cash = 100};
  ["Round2"] = {Cash = 763};-- :D
--etc
}
--then when trying to get the amount do something like this
local roundAmounts = require(PathToModule)
local amount = roundAmounts["Round"..*Round.Value].Cash
PathToPlayer.leaderstats.Cash += amount -- keep in mind that you would switch Cash with whatever currency your game uses
-- *instead of Round.Value just put whatever way you are storing the round number and put it there so it can get the correct cash value in the module

No direct answer from me for this one, I do have a semi-useful thread that you can look at. Please don’t just copy their script as that’s not very polite in any way, just use it to learn off of as you are doing with this comment.


That’s pretty much all from me! If I didn’t get to one it’s cause I don’t know how to explain it. If you ever do create the game please do tell me as I very much enjoy these type of games! One last thing you should know, none of these scripts have been tested to work with any examples, they are simply me sitting at my computer for an hour because I’m bored :upside_down_face: and that I have never personally created a tower defense game, meaning that the is from experience with other types of games to try and explain this kind of game!

Surprised you made it to the end, :scroll: ScriptKing

3 Likes

Wow, thanks so much for this. I’m trying to learn some basic scripting right now, just so I can understand this. Then, I’ll use this and other bits of codes to piece together a game. Thanks once again!

Also, I never copy others code, unless it is a module of some sort, or if I had permission. No need to worry :grin:

1 Like

Sorry if I’m bumping the topic or anything but I just found this video that I think will answer a majority of your questions while teaching you to script a little! :grin: Hope this helps, I’m sure my other comment was pretty confusing/overwhelming.

https://www.youtube.com/watch?v=DanjB0cTfw0&list=PLtMUa6NlF10fEF1WOeDtuGcIn0RdUNL7c

It teaches you

and I believe it teaches you

And more if you just stick with the series he is making!

Thanks haha. I’ve actually been loosely following along with it to help me get through this. I’m on episode 9 at the moment, but I’ve taken a few days for a break.

3 Likes