How do you write an actual code after learning the basics?

For the past year ish I have been learning scripting, but never gotten into writing my own actual code.
I either edited some of existing code of my game a bit or wrote scripts I could find in toolbox instead of writing them myself

The first thing I ever made on Roblox was a brick that changed colors really fast. I learned from The Advanced Roblox Coding Book, which me and my friend bought together off Amazon when we were younger. He ended up going into UI development and building and he’s amazing at both, I suck at both lmfao.

With that being said, I’d say just do what you can and start with something light. A door that opens and closes on a hinge is a good one, and after a year of learning Lua you should definitely be able to pull that off. Or a coin system where coins drop, you pick them up, and a counter on the side of your screen goes up.

Once you’ve got one of those working, just keep picking slightly bigger things. That’s honestly how it starts to click.

Write systems/services (modules) that work for a majority of games, then branch out to simple game ideas to hone out your skills
For example: a party/lobby service that lets people invite others into their party, kicking them, joining lobbies etc.; a hitbox module that returns whether a target was found, with different hitbox types (think radius, rectangular, projectiles); so on and so forth

You’ll find that a lot of what you will write is just recycled from what you already learned.
If you get stuck, look on documentation or on other sources for methods to move forward
e.g. “Well how would I make a hitbox?” → “Roblox has a few different detection methods, namely simple magnitude checks, raycasts, spatial query etc.”

I’d learn the fundamentals of coding then, Honestly just make your own stuff, I know that sounds like superficial advice, but it’s true, the only way you’ll improve at coding is by literally just doing it. The more often you do it, the better you get. Think of something cool you want to make, and make it. Although keep it within reason like try to make something that you can realistically make at your current coding ability. Don’t rely on AI to write your code either, espicially as a beginner, when your trying to actually learn the fundamentals.

I also strongly recommend learning the fundamentals of LuaU from brawldev who has a youtube tutorial series, start from the beginner guide, and watch each video thoroughly, and follow along with what he is doing in the video. After the video is completed, try to recreate what he was teaching you how to do in the video, on your own, without any help or assistance from anything. This’ll build muscle memory, and really help you remember the fundamentals better. This is how I first learnt the LuaU fundamentals, and I strongly recommend anyone who wants to learn how to code do this aswell.

I think a big missconception that people have when they are first learning how to program is that they think that everyone else who is “good” at programming in their eyes is just naturally talented and was like born that way. Which I can assure you is not the case at all, everyone is bad at coding when they first do it, the people who are good at it, just never gave up and keep coding despite being good at it, and they got good at it overtime. Just consistently code and you’ll get better overtime.

The others nailed the advice - just build stuff and iterate. But I think youre actually asking a different question: how do you go from “I can edit things” to “I know what to build from scratch.”

The gap is that you need to reverse-engineer the problem. Pick something you use in a game and ask yourself how it works technically. A health bar? Thats just a GUI that listens to a value changing. A knockback effect? That’s moving the character’s HumanoidRootPart over time. Once you name the mechanism, you can Google “how do I do X in Roblox” and the Luau pieces fall into place.

Start stupidly small though. Not “coin system”-literally make a part that prints to console when you touch it. Then make it remove itself. Then make it award points to a leaderboard. Three separate scripts, each one thing. You’ll write garbage code and that’s fine.

The toolbox dependency is actually the poison here because you never had to think about why code was written that way. Reading someone else’s solution skips the problem-solving part, which is where you actually learn