How do I learn to script

  1. I want to achieve learning how to script

  2. **What is the issue? I don’t know where to start

  3. What solutions have you tried so far? I tried looking on yt but could not find a series

4 Likes

Make sure to search before posting. This question is over-asked.

https://devforum.roblox.com/search?q=learn%20scripting

1 Like

just start with the reference page.

1 Like

Start out with small scripts and experiment. Good basics to learn first include: loops, statements, and creating/ calling functions. But check out roblox’s tutorials and pick up on how it works.

One other thing, scripting is a skill best learned from experience.

1 Like

Start by learning the basics. Look at developer.roblox.com, you can research new methods for codes. Eventually when you learn the basics you can put all of that and make a simple game. Maybe you can have data stores, cutscenes, tweening and a lot of different things.

1 Like

Well, it depends on how you’re viewing it. If you’re strictly speaking about learning Lua itself, then you’ll have to learn the fundamentals and logic behind it (if-statements, loops, functions, etc.). If you want to learn more advanced concepts (metatables/metamethods, etc.) then you can search the wiki or the forums.

If we’re talking about scripting an idea and implementing it then that’s another story.
There can be many methods/solutions to implement a single idea. You’ll have to research (a lot), attempt, most likely fail, cry ask for help and then learn from your mistakes.
You’ll slowly accumulate the knowledge and be able to use previous experiences to devise your own quick and efficient solution to a problem.

For example, “I want to make this frame appear when this button is clicked, and then disappear when it’s clicked again”

Simple, right? You’ll try this:

button.MouseButton1Click:Connect(function() 
    if frame.Visible == false then
        frame.Visible = true
    elseif frame.Visible == true then
        frame.Visible = false
    end
end)

I mean… it works.

But then you discover that there’s a simpler way that only requires one line:

button.MouseButton1Click:Connect(function() 
    frame.Visible == not frame.Visible
end)

And then you’ll keep this method in mind for the future when you encounter similar problems.

As @greatgavin said, it’s all from experience. You’ll gradually pick up on what works or not, though this will require a lot of dedication.

Once you learn how to program in Lua, you can view open-source projects to see how they go around solving problems that they encounter and you can learn from it

If you’re the kind of person to learn through videos, I recommend Peasfactory. He has playlists that cover the fundamentals of Lua, though some of them might be outdated.

I wish you the best of luck.

1 Like

Just look at the roblox wiki for what you wanna make and try and understand what’s happening, and you can ask here about stuff that you don’t know

Here is the best way to learn it. Try learning for YouTube, 100’s of Roblox Developers have made videos on beginner scripting. You could use the Roblox Developer Hub that provides information for each and every field in the development sector - Documentation - Roblox Creator Hub . How to find the issue in a script? Try using Print functions to check if the event or part of the script has fired or not which will trigger the print function in the Output. You can bring out the “Output” tab from going into Studio > View > Output. The output also provides errors that gives you the line and error in the line that eases your work. It will be very hard at first but you will get the hang of it.

Goodluck!

1 Like

There a great scripting tutorials from multiple people such as PeasFactory, and AlvinBlox. they each have a beginner scripting tutorial series.

2 Likes

Well I mean on Youtube are a lot of Script Tutorials xd Just like alvinblox or some others:)

Alvinblox : https://www.youtube.com/channel/UCp1R0TBvgM7gj0rwTYULmSA

1 Like

Just create simple things and ask people what you need to make it work or check dev api reference

I learnt to script because of @Alvin_Blox
I strongly recommend him.
He has a beginners series which you should watch. It covers the very basics of scripting.
You can find it here: https://www.youtube.com/watch?v=BfLUt3mfJiY&list=PLsbxI7NIoTth8CE_os8sog72YTMLPhDSf

2 Likes

How would you go about learning a new language like Spanish?

Lua Learning by Boat Bomber is a pretty good source

They also have a website for lua learning:

Try these sources

https://www.youtube.com/watch?v=4WGffzwCdyc&list=PLsbxI7NIoTtiexnJD6x0da7VxX3CGHy1K (this is where I learned most of my basic scripting)

Platform Overview | Documentation - Roblox Creator Hub (I still use this when I don’t know some stuff, since it is roblox official)

Scripting Support - Developer Forum | Roblox (the scripting support category)

Edit: @LoveTheBears101 also has a good idea, Lua Learning is a great game to learn lua, and it’s free.

1 Like

Hello!

Here’s a YouTube series that can help you learn to script: https://www.youtube.com/watch?v=v3dbJXSa12Q.
This is the first video I have ever watched about Roblox Lua and I still come back to this series when I forget some things. The guy explains everything greatly and makes it easy to consume the information.

Additionally, I heavily suggest you’d go to the free models section in Roblox Studio and try modifying other’s scripts, try playing around and modifying some variables to understand all the stuff for yourself!

Last but not least, I discourage you from trying to make a big project on your own, especially while you haven’t fully learned the scripting language. Always remember that there isn’t an “easy” way to learn scripting, it is hard and time consuming.

Good luck!

Again?!

Are you sure you at least tried to search this before? This was asked 10 times in the last 3 days.

Anyways, since you couldn’t find previous posts, I’ve compiled the resources:

(Anyone is free to link this in the future)

There have already been multiple “How do I learn how to script” topics posted on the DevForum. Please do adequate research via. the search function before posting in this category to ensure that you aren’t creating duplicate topics.