What's the best practice for scripting as beginner?

Hello,
I’m a beginner in scripting, though I already have some experience working with TweenService and a basic understanding of core scripting concepts. I’ve attempted to create a few systems on my own, But I often find the process quite hard and sometimes feel unsure about what steps to take next, so I end up asking AI and just copying some lines of script - which I don’t really want to do. I actually want to understand everything and write the code myself. I believe this might be due to a lack of practical experience.

Could you please recommend some effective practice exercises or project ideas that would help me deepen my understanding of scripting? My goal is to eventually be able to apply these skills to develop a complete game.

Thank you in advance!

Best regards,
dantez

5 Likes

Do you have any projects you’re working on right now? I find the easiest way to learn as a beginner is to just create a basic game like a simulator or obby or something.

1 Like

I started out as a builder on Roblox, but I realized that wasn’t going to help me grow much as a developer. I found it really difficult to understand code, especially since I only started learning programming at 15.

A developer named “MONCHAZO”, who owns a very successful game, recommended that I use the Toolbox to study how different systems are made — not to copy, but to understand the ideas behind them.

From there, I began studying both the official Lua documentation and the Roblox Developer Hub. Learning Lua is definitely a process, and you have to constantly stay updated and keep reading the docs.

My personal recommendation is to watch simple YouTube tutorials. I started learning from this playlist:
:link: https://www.youtube.com/watch?v=nRS255_y8rM&list=PLXX6hhg4CysbJWPZTFBxCxutohhKNrHKU
Nowadays, I’m comfortable with several programming languages. Lua was the first one I learned, and thanks to that foundation, picking up other languages has become much easier.

Have a nice day :slight_smile:

4 Likes

I already watched DevKing Tutorials, and I’m able to create a simple system like NPC with task, kill brick etc. I just need practice exercises.

DevKing is an excellent YouTuber for tutorials, but it’s important to understand that you won’t truly learn unless you challenge yourself on your own.

Starting with simple things is key: get familiar with Parts, explore their properties, and learn how Roblox services work inside Roblox Studio.

Consistent practice and genuine curiosity are what will really help you grow as a developer.

Try making simple games like obbys, escape rooms, or other easy projects.

1 Like

Honestly just start making things… best way to learn is by trying new stuff. They don’t need to be crazy at all either. You should take on projects that help build you up as a programmer rather than jumping into a fully fleshed out game. This is mostly just my 2 cents however, I have rapidly grown as a programmer by simply making systems. If you’re more so interested in learning paradigms like OOP and Event-Driven programming, you can as well. Just don’t fall into the trap of making everything an OOP class. That’s not what OOP is for and a lot of people that are new to OOP tend to make everything into a class. I also recommend looking at Packages like Promise, Signal, Component, ProfileService(now ProfileStore), and many more to help speed up your development or aid in certain aspects. I can go on and on about this so feel free to ask any questions. At the end of the day, it’s not the code that makes the game, it’s the user experience that comes w/ it.

Yes, I strongly agree with this. I’ve learned coding in Roblox since 2017 using this method, and it has helped me greatly.

Then, try making something small. Every month or so, try to come up with an idea of a project that you can create successfully, which will not only boost your confidence but also your skill level.

5 Likes

Id say the easiest way to practice is to code simple things. I got better by coding things like a simple ui opening, simply making a part do something, like increase the players walkspeed. For me personally, it was easiest to make a couple simple, and admittedly bad, simulators first and then moving on to other stuff later.

The most important thing to keep in mind is the fundamentals. Dont be like me and try to make a bunch of big projects. Learn functions, datastores, and especially for loops (took me 2 years to understand for loops). I’d also reccommend checking the roblox docs, cause this rlly helped me out.

Also, if youre gonna use AI for code use it to learn too. Js make sure u understand what its saying so u can write it too. What i always did was ask ai how to do something, read over it, and try to make it by myself. I only checked back to what the AI said if i was rlly stumped.

Anyways. Good luck in your future on roblox :slight_smile:

3 Likes

So, basically loops are one of the most important things ?

I mean, it rlly js depends on who u ask what the most important things are but I feel like for loops are definitely important because they allow you to handle individual objects within another, like parts in a folder, and other important stuff too

I’d like to preface that I’m more of an intermediate and a complete solo developer; I’m not a master programmer just yet and have not formally worked with a team before, only cohorts with my friends. But I’ve gotten to the point that I can more or less create most ideas I can think of from scratch.

I first learned through scouring through scripts made by people more experienced than I, and editing them to achieve the results I wanted. With that, I was able to create my first few projects that were mostly a patchwork of different scripts heavily edited into something that was ultimately my own work. That was how I first got off my feet, but I understand if you would rather do everything from scratch on your own. But from my experience personally, I have never touched a scripting tutorial. I was hands-on my whole journey. That may not be the best for everyone, but it’s how I learned.

When I started making my own systems from scratch, though, I often ran into the issue of coding myself into a corner with bad practices and burning out on a project. That hemmed me into a mindset of fear and burnt me out on game development as a whole for a while.

In my opinion, though, just creating something is significantly more important than worrying yourself to death about all of the ways you could be messing up. Sure, when you’re moving into the world of advanced scripting and undertaking a project that you really don’t want to screw up, especially when working with other people, it’s best to take it slow and understand the implications of everything you’re working with. But for learning, I’d say that prioritizing momentum and experimentation is key. Taking things as they come is the best teacher I had.

If your code has redundancies or is messy at first, oh well. You understand how it works and why it works, and that seems to be what you’re pursuing. Fluency and good habits come with time.

As for some simple suggestions, here are a few:

  • Space your code out more if it helps you understand it better. If you like it compact and with a lower line count, you can slim it down too. Just format it in whatever way works for you.
  • Annotate your code. Even if you aren’t working with anyone else and no one will ever even glimpse your code, annotate it. I’ve found it’s a great practice for comprehension, and if you need to return to this script at any time in the far future it’ll help you get right back into it. If you don’t know how to annotate, just type like this at any point in your code:
-- Your text here
--[[
 Or your text here
--]]
  • Practice good garbage collection. If you create an object in your code that is going to later disappear, then make it disappear. It sounds silly, but it’s surprisingly easy to create lag after a server has been up for a while when there’s a bunch of still-defined objects sitting around in post-use limbo and not being used.
  • Put checks in your code, it never hurts. Checks of any kind, but personally nil checks were what messed me up. You might save your game from a server-ending error if you just code “if this object exists, then do this with this object” instead of just “do this with this object.” You’d be surprised, stuff can sometimes just stop existing.
if part ~= nil then -- if this part is not nil then
  -- your code with the part here
else
  -- if the part doesn't exist, handle it
end
--[[ if you didn't run that check and just tried to run your code for
the part and it was nil, you'd have gotten an error that could have
compromised your code. --]]
  • Finally, Roblox documentation and the devforum are lifesavers. As tempting as AI is, I’ve found that long-term, the devforum teaches you much, much more. Of course, when I was in the bulk of my learning, AI wasn’t available… but still, like I said, I have a ways to go as well with programming, and have used both. This is just what I think.

I hope that this helps. Whether it does or doesn’t, here’s a devforum post that might help you further whose author is probably a fair bit more eloquent than I.

Good luck on your journey. We all believe in you.

2 Likes

To add on to this, especially for Garbage Collection…

PLEASE PLEASE DEVELOPERS learn how to use LuauHeap. It can help you find unwanted memory leaks in your code. Also learning how to read the charts for the MicroProfiler is huge for optimizing frame usage.

2 Likes

Do you think escape room is good practice? Or should I just keep making simple systems and keep mastering fundamentals like loops ?

Sure, I think an escape room would make for a good learning ground.

It’s a controlled and linear experience for the player, and working on it gives you, the developer, an opportunity to familiarize yourself with a range of systems. Triggers, UI, player input, loops, timers, checkpoints, etc.

If you’d rather spend some time mastering fundamentals first, that’s okay, but nothing’s stopping you from undertaking a game project even if you are inexperienced. An escape room is a fine candidate, especially if you enjoy more cognitive kinds of games. Like I said, hands-on experience was very effective for me, so maybe you’ll see the same benefit. Good luck if you do decide to make it!