I have tried to learn how to script for some years but it is very confusing because it is hard to know where goes where in the script.
Not sure what you expect us to do about that. You can, you know, always use the search bar.
https://devforum.roblox.com/search?q=learn%20script%20category%3A55
I would recommend watching @Alvin_Blox scripting series on youtube or @Peaspod scripting series (a bit outdated).
All you have to do is google it. I even think there is a page(s) on dev forum.
There are plenty of ways:
YouTube: There are thousands of tutorials and lessons on scripting. I would recommend people like AlvinBlox when it comes to learning.
DeveloperForum: If you have questions on a problem in your scripts, or if you are curious on a certain aspect of scripting, you can look up the question, or ask it yourself. You can even scroll through some posts that have already been solved, and see what the solver did to resolve the problem.
ScriptingHelpers: Similar to the DeveloperForum, you are able to ask or look at already asked questions, and there is an active community there to help you out.
Experimenting in Studio: You can look at free models, along with their scripts, and you can try to piece together whatâs happening. You can also try to make simple functions (like moving a part, changing its BrickColor, etc.) Thereâs no better way to improve your scripting skills then by just doing it.
Scripting is full of trial and error, and you only get better by practicing and learning new things.
There are many topics that are existed by previous users asking this question, but I will help you out!
Alright, if you want to learn scripting like the beginning or maybe some lessons, you should watch AlvinBlox or PeasPod. Alvin is more advanced and has a great explanation when it comes to many things, but Peaspod might have outdated things, but also some very important details and explanation of coding and variables.
You could go to the Developer Hub to learn some tricks and maybe some code and what each variable means and how to use it when it comes to coding.
I learned by watching Alvinblox, TheDevKing(Tapwater) and reading the Develeper hub.
Just look at the actual LUA documentation and test things
I would reccomend learning vanilla Lua before learning the roblox version of it. Thereâs a website called Tutorialspoint that provides a good crash course in Lua.
After you understand basic functions and syntax, read through some articles. The roblox dev website is a good place to start. I donât reccomend watching tutorial videos early though. It really messes up a beginnerâs view of scripting, since most youtubers, like AlvinBlox, donât explain the mechanics behind code.
Well after that, practice. Nobody masters scripting without practice.
Good luck learning scripting
My recommendation would be to try and look through all the basic articles and the API references on here. Documentation - Roblox Creator Hub
The API references wonât be as useful at first but once you get going it will be a useful tool. I too was once in your position and I looked everywhere. Which if you are like me then the link listed above probably wonât be enough. Though I was much younger at the time. I had to go out and learn programming principles from other languages and because basically all programming languages share the same concepts it was an easy transfer over.
I believe that you can avoid my process of having to learn c#, python, JavaScript, and Java to actually learn what you are doing. So I am going to give you a list of things that I think are most important and the things I use the most when scripting on roblox.
Variables Variables | Documentation - Roblox Creator Hub
Variables are a must to know though they are very simple on roblox.
Operators Operators | Documentation - Roblox Creator Hub
Knowing these will allow you to do so more much with your code.
Conditional Statements Control Structures | Documentation - Roblox Creator Hub
Almost all my code includes some type of conditional statement as most scripts need a reason to run and donât run out of no where.
Functions Functions | Documentation - Roblox Creator Hub
Functions are the greatest tool a scripter has, besides the internet. Retyping code is a waste, there is some acronym for functions but I forgot it and donât feel like looking it up.
print()
, Iâm not going to go find and article for this one. Its very simple, just type
print("Hello")
and âHello will be printedâ, very useful for debugging.
Remote Events and Functions Custom Events and Callbacks | Documentation - Roblox Creator Hub Client-Server Runtime | Documentation - Roblox Creator Hub
Remote Events are a must to know because of Filtering Enabled. If you do not understand them I suggest really trying to figure them out because you will get nowhere without them.
Those things in my opinion are the most important things to understand before you start trying to do anything. Now I am going to list some things that I donât think are as important but are still crucial to scripting on roblox.
Tables Tables | Documentation - Roblox Creator Hub
Tables I donât think are as important as I donât use them that much. I still do use them but I often opt for other solutions which is probably why my code is so messy.
DataStores Data Stores | Documentation - Roblox Creator Hub Documentation - Roblox Creator Hub
DataStores are not a crucial thing to know unless you have to save data. You could probably make a decent game without them, but eventually you are probably going to need them
Comments Comments | Documentation - Roblox Creator Hub
Comments are very easy to learn and very useful. They arenât as important but can be useful for a lot of things, such as debugging if you really need it or if you are working with a group of scripters explaining.
Developer Console Developer Console | Documentation - Roblox Creator Hub
Very useful for debugging.
These are the things that I believe you should know about when scripting on roblox. There are more articles out there about other things but you will likely have to learn everything else from experience.
Know how to actually use these resources and learn to create something.
Know that you have the links and places to go I want to inform you on the way I think is best to learn these things and keep them in your memory. The most important thing is to always do the things that you are learning. Humans learn from doing things. You can listen and read everything about scripting on roblox but if you are like most people you will forgot it or not understand the things it is trying to teach you. To do this I recommend creating a very basic script out of everything you read about. If you read about functions, make a script that has a function that prints a sentence every time it is called. Like I said before you likely wonât be able to remember and keep all the knowledge you gain from reading articles unless you do it yourself.
Although these things might give you a start they wonât teach you everything. Eventually you are going to run into something you donât know about and something you donât know how to do. So here are some solutions.
Go to Roblox Engine API Reference | Documentation - Roblox Creator Hub and look up the specific thing you are trying to use but donât know how to use. This can be kind of useless in some situations, as this wonât tell you how to make a spaceship to fly to the moon. It will only tell you every little thing about the things that you can use to make that spaceship.
The Roblox Devforum. The roblox devforum is a great tool because it is full of people who will love to help you out with the problem you are facing. Though you should use this tool lightly and you shouldnât use it for people to do your own scripts.
YouTube is another great source for help. It can help you understand scripting concepts, give you a tutorial on how to do something, and much more. Though this can be limited as there will only be tutorials on things the Youtuber wants to make a tutorial on. I have had the best Experience with TheDevKing, though other youtubers like Alvinblox are good too.
There are some other offsite places where you can get help too
If all of these solutions donât work then I have one last solution. Figure it out yourself. This might seem like bad advice as you couldnât figure it out before but problem solving is a useful skill. Even though you might not think it you can eventually figure something out. You just might have to reference the things above to help you.
These were my tips on how to learn to script. I hope you can use these tips to help you learn to script and avoid having to learn a bunch of languages before learning what basic things meant.
I started off by watching the Roblox University race game tutorial on YouTube, and they have other videos too. You can skip the first videos about building cars if you know about that.
There are hundreds of these posts. Use the search bar.
You can try lua learning : https://lualearning.com/