Advice for a relatively new scripter

Hello guys, I was curious to know if you guys(as in other scripters) would recommend a relatively new Luau scripter. What should I do before I actually begin working on projects? What would you suggest I begin with(besides the basics)? My main questions are:

  • Should I begin learning Lua before I learn Luau? (I already have Lua set up on my Visual Studio Code.)

  • What is the best way to retain information about Luau? (I struggle to retain scripting knowledge when I’m actually writing code.)

  • How long does it usually take before scripting “clicks”? As in, being able to code without constantly referring to documentation or pre-made models from the toolbox.

  • Lastly, where should I place and organize my scripts? For example, if I created a combat system, but also a flight system, where exactly should the said scripts go? And how many would I realistically need for each project?

Thank you,
3vangelism

1 Like
  1. Personally I’d start with luau, since you can do everything in lua, but you can also visualize what you’re doing by moving/coloring parts for example, instead of just printing plain numbers all the time.

  2. It’s just about doing what you’re trying to remember a lot. It’s okay to forget some syntax(how something looks in code) and such at times. Just remember to always write out the code manually while trying to understand what it does instead of blindly copy-pasting it in if you forgot how to write it yourself. I also just used to play around with the part values using code, like making it half transparent, making it get a random color every second, having the part move up etc. Just small, simple stuff. And once stuff like that got easy enough, I started thinking a bit bigger, like using tweens to make a black hole suck in and shrink everything nearby.

  3. I find myself reffering to the docs quite often, more so when double-checking if I was doing smth correctly, but also when I just forget how to do smth. The more you code, the more you will remember, but still you’ve gotta keep in mind that copy-pasting code wont help you if your goal is to get better at coding.

  4. That really depends on how you made the scripts, tho it doesn’t matter much if you’re starting out. I’d put a client one (which handles inputs) in StarterPlayerScripts or StarterCharacterScripts and then the server one which handles the logic in ServerScriptService. And depending on how complex it is, a ModuleScript in ReplicatedStorage which would hold shared code for shared logic instead of duplicating it for both client and server scripts.
    And about the same would go for the flight system.

Tho I would like to note that a combat nor flight system are very good things to start off with if you’re a beginner.

1 Like

Im still relatively new, and i found learning Luau first worked well, and after maybe 4 months, i could write code by myself, but i will always be learning, and by what I’ve heard, and my experience, you will always have to look in documentation from time to time.

1 Like
  1. Just learn Luau.

  2. Check documentation. Like if it’s workspace:Raycast() you don’t remember the parameters for, check documentation for “workspace#Raycast”. It will eventually stick. And remember, DO NOT try to remember everything.

  3. I would say it really depends.

  4. Use SSA, short for Single Script Architecture. The point of it is that everything on the server is run from one Script, and everything on the client is run from one LocalScript.

This forces you to make modular approaches and habbits, which makes it easier to expand and organize your game.

Summary of SSA:
You insert a Script into ServerScriptService and call it “Server” or “Main” (names is just what I would recommend). Then if you are making a system, you insert a ModuleScript where you then write it. As an example you could do

function initialize()
    print("System was initialized")
end

return {
    initialize = initialize
}

Then in your Script you just write

local Test = require("./Test")

Test.initialize()

For the main LocalScript, put it in ReplicatedFirst, then it’s the same concept as on the server.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.