Couldn't learn how to script

Hello I know this may be an embarrassing post but I currently know the basic skills of scripting like how to print words to appear on the output segment or using scripts to make parts appear on different positions but not enough to entirely use to produce a game. I have watched a few AlvinBlox tutorials on scripting, but none of these videos can help me understand how to script. I need more rescources and where i should begin with. Do you have any ideas?

12 Likes

Well theirs many ways you can learn scripting but theirs no one easy way. I personally started scripting by watching youtube videos on the basics then taking free models and taking them apart and seeing if I can understand them. You can also use Scripts | Documentation - Roblox Creator Hub which has quite a few tutorials for new scripters.

Best of luck on your new journey into the scripting world!

6 Likes

Hello there @CarloBloxDev, so first of all this question has been asked many other times and the next time you ask a question, make sure it hasn’t been asked before by using the search feature. Now to answer your question. The best way to learn programming is by reading the wiki https://developer.roblox.com/ and by reading PiL (Programming in Lua) (at least for me that is how it has been). You can find a free .PDF file online. By the way do not learn from AlvinBlox. Not a really good resource. By the way if you good any scripting related question you can hit me up in my discord, vamik64#5736. I will be glad to help :slight_smile:

6 Likes

I’m actually learning how to do basic scripting on Roblox. I think youtube videos are helpful and I like to use the wiki too.

2 Likes

Google is your friend. There are countless resources out there for getting started with scripting. This question has been asked numerous times before. I encourage you to search for an answer before asking here.

5 Likes

Google or the Roblox Wiki is very good for this type of thing. One of the first scripts I made was a simple thing like this:

script.Parent.Part:Destroy()
2 Likes

About error debugging; If you have an error and would like to use google to try and fix it, but dont know how to phrase it, try learning the scripting jargon.

It can really help you better phrase errors into the google search, to get the best accurate search result!

1 Like

You can’t expect to figure out how to script an entire game straight away after watching a few videos on scripting. Learning different programming languages take time and effort, and usually will involve quite a bit of math for more complex algorithms.

In specifics to Lua, the best thing you can do is continue what you are doing and simply watch tutorial videos which explain the different functions available within Roblox Lua and how they can be utilised. Start from the basics and work your way up to the intermediate and more advanced stuff.

You should use the developer wiki in order to read the extensive documentation provided, giving you the option to search up a function and read what it is used for and usually most of these will provide practical examples. That is the only way you’re going to learn how to script.

5 Likes

Make stupid things. Seriously, just experiment. By experimenting, you find new functions and hone your skills. I have over a dozen places just doing stupid things or recreating what I’ve seen in a Youtube video.

Another tip is to stalk scripting support posts. I, personally, silently change an interesting script support topic’s notifications to “Tracking” to see the outcome. Many times, I learn something from it. Try it.

And, finally, the Roblox Wiki. It’s been mentioned before, but, seriously, use and abuse it. It’s amazing. Same goes for the DevForum: There are so many posts about so many topics there is basically an answer for everything. And, if there isn’t an answer, if you make a readable support topic there will be wonderful people who want to help you.

Just don’t give up. Push through and try to script things you love. I know you can do it bro :fist_right:

8 Likes

You could always try and get some free models (using them isn’t a shame for learning purposes in my opinion), see what they do and checking with prints what function does what. From there look on the dev wiki about the statements. That’s how i did it (as i never really was the type of person that was patient enough to watch a tutorial). Just see what fits you best and once you found it keep applying it, even now after 4 years I’m still learning aswell :wink:

2 Likes

How Did I Learn Scripting?


The Experience
The way I learned scripting is from experience and, of course, experiments as previously mentioned by @DatOneRandomDude. However, I learned the most basic parts of programming, which frequently returns in the in-built functions of the language.

Previously, I have been digging around programming in Python, which I did not really find any greater results from, due to the lack of time or sufficient knowledge behind some API.

In my current experience, debugging is the one part that is the loooongest of them all. Because sometimes the code fails, due to the fact that there are a multitude of factors that raises up unexpected results.

The Practice and Conventions
The starting portion of scripting is frustrating, you simply cannot comprehend what does what and don’t really know where to exactly start. Tutorials may help. Make sure to follow some “conventions” in scripting, considering the readability for other users whether you request assistance for your code.

Conventions can be found here: Roblox Lua Style guide

Still stuck? Search for a tutorial across the web. Fair warning though, some practices in a few tutorials are outdated, which means deprecated functions, methods, properties or objects.

For most of the part where I have been programming, it was simply a lot of testing, debugging and experimenting. New methods may surface upon experiments and eventually you’ll find one of the best practices for the specific field of scripting. Trial and error.

Acquiring Information & API
Whenever I am stuck in some programming session, I usually attempt browse the DevForums for an existing answer or stick around the best site that holds the most wonderful API and some tutorials are included.

Random knowledge that I’ve found came from daily viewing of #development-support:scripting-support, where I can discover mistakes and improve my existing methods, including optimizations and sanity checks.


Some Basic Steps

  • Planning the scripts’ functionality
  • Write the code; doubts about methods or events, should be checked in the API.
  • Debugging, ensuring no unexpected behavior occurs
6 Likes

Okay, basically learn one by one and don’t give up on yourself


Good, you already know some basics. The way you write the paragraph feels like you’re giving up or helpless. Anyway, whaaa, none of these videos help you understanding scripting?

girrf

Or maybe… you’re just not looking for the right thing, like let’s say you try to make a chair but you search up video about building bed. Even worse, do you even know what you’re looking for?

girfff

Here’s I got my way around scripting, to achieve what I want. Making a game is really a huge work to do, so break it up into chunks, and do things step-by-step. What I mean by that is, write down and outline elements/features that you want to achieve in your game.

Okay, let’s say you want to make a hotel game. Things in a hotel game are usually elevators, sliding doors, beds, animated TVs, check-in system, lighting system, or day-night time cycle. Now that you’ve identified what you want to exactly make, classify from the easier to the most complex.

Do the ones that seem to be easiest first, look for tutorials and seek for help. Let’s say, go with the day-night cycle first and then look up tutorials on that. Ok, tutorials not existing or still not satisfied? Join the scripting communities, like on Discord, there are lot and you can get near-instant response1.

To answer your actual question, here are some resources I’d suggest you to look at:

  • Roblox has its own tutorials, so take a look
  • Roblox uses the modified Lua programming language, so see their manual
    Note that the free version is the first edition, you have to purchase newer ones, but it doesn’t matter much so don’t worry.
  • YouTube videos again, AlvinBlox or even from Roblox itself
  • Roblox DevForum’s community resources section
  • Roblox’s toolbox, try to see how those free models work (careful though, they could contain viruses)

Okay, final tip, don’t force yourself to development when you don’t feel like it. Good luck and happy scripting!

1as long the people want to help.

image

8 Likes

About a little over a year ago I felt just like you do right now, and honestly the first couple of weeks learning to code is awful and painful but once you get over that it’s so worth it. But really the trick to learning to code is you need to learn how to learn. Learn how to solve your own problems because 90% of coding is problem solving, what I used to do is just keep making a bunch of random games and whenever I would get stuck on a problem I would solve the problem and that would be a new skill I learned. Starting by trying to change properties, basic loops, basic operators, you will get the hang of it in no time and you will be a pro coder.

2 Likes

The wiki is really the best place, same with the old classic Youtube tutorials. These teach you HOW to achieve things, but nothing really explains it. I personally learned through time and experimentation, and using resources like the forums allowed me to learn a lot.

Think of something you want to make, and think of what’s required to build up to it. “I want to make a sword” well how do you get the sword, then how do we get the sword to do damage, then animations and etc… or however you prefer to start. Just build from the ground up, and experiment, ask tons of questions and look everything up. Before asking questions though, look it up and keywords here on the forums or Youtube and see if you can find something.

3 Likes

Go ahead with your own choice. Choose whether learning by doing “experiments” or learning by watching tutorials, going to wiki, googling. Both of them works like a charm. When it was my first time to program something in Roblox. I watched some tutorials but later on I “leveled up” which made me learn more stuff and from that time, the frequency of watching tutorials in the web are descending.

I recommend you to not to watch AlvinBlox for scripting. He does not explain codes at all. He just give you the code and the steps.I recommend you to watch tutorials by others such as RIPPER0NI, DutchDeveloper. They can help you understand how to script in Roblox.

Well I first really started coding in lua making games on roblox but I would sit for while looking at one script.

Then my brother invited me to job for startup company and there I work for free until I could contribute there I learned Java,Javascript and other web stuff but my point is learning the other stuff increased my workflow since I understood the logic I learned Object oriented programming which can be applied in lua.So my advice understand the bare logic behind lua (like how the code exactly work) and learn more programming concepts read stuff about how programming work and I go to https://www.lua.org/pil/contents.html and test what you learned in https://www.lua.org/demo.html also if are still in school and they have programming as subject get involved and get more experience in what programming is in general.

1 Like

Try to modify or delete or change free models, i started scripting using that, that will give you a idea…
Don’t forget the Dev Hub!

1 Like

Hey! Don’t give up, scripting can’t be mastered and learned overnight.
You could do the following;

Open free models, check their scripts, understand how they work, and try combining code!

  • This works most of the time, I helped many people learned how to code like this, once you get the hang of it you will be able to start scripting.

Use the DevForums

  • Another great recourse is the ROBLOX official Developer forums, the site we are speaking on currently. This site can help you with any coding, building, just about any development issues.

Use the developer.roblox site

  • This site is a great site to learn scripting, here it is
    Roblox Developer Hub
    This is an amazing way to learn.

YouTube Tutorials

  • There are many YouTubers who can have great and helpful tutorials. If they provide the code in a model, try making it yourself instead of using the model. If your just using the model, try understanding how it works.

And finally, friends!

  • If you have experienced friends who can code, ask them for help, they most likely will help.

I hope this helped you, just don’t give up on trying. You will be able to script as long as you try, and this isn’t embarrassing, this happens to a lot, and some give up. Glad you didn’t and you came to DevForums.

~Kensizo :slight_smile:

4 Likes

For a start, you shouldn’t be embarrassed by this post. We all started just like you, trying to figure out what all these weird words and symbols meant until eventually the language of choice was like a second language.

Scripting can be frustrating and intimidating to learn, but the reward is great. The first thing to remember when approaching programming is, don’t give up. I will tell you now, once you have picked up the basics and start writing your own scripts, you’ll get a certain feeling of pride knowing that you’ve created something that works - even if it is the most basic of things.

Now to address your question. From a personal view I learned first basic Python skills through school. This gave me a good understanding of computational thinking and how a program should look. In my opinion, LUA is a great programming language with a lot of possibilities on the ROBLOX platform. To learn it you should first address basic computing and make sure you understand topics like computational thinking, the three concepts of programming (sequencing, selection and iteration) and look up any other background knowledge you think is appropriate.

When you think you are ready to start with learning programming itself, take a look at some other people’s work. See how it is structured and try to understand what each line of code does. ROBLOX provides some great resources to help you understand code such as the DevForum, Wiki and others. You can always ask the community and google will help you gain more and more knowledge. Some helpful sites are Scripting Helpers, Stack Overflow and the DevForum itself.

Come up with something you want to be able to do in your head, and research what you need to be able to do to get there. For example, maybe you want to be able to make a money system for your game. Look up how to use values for each player and how you can change these. Then look into Data Stores and saving this data for each player. Once you understand each part, put it all together and get it to work. This is usually the most satisfactory part of a project. Address any errors and try to make things as efficient as possible and then you can take a step back and look at what you have created.

Like I said earlier, after learning all these new things and completing a project you will feel proud of yourself. The main thing you need to remember is to carry on through the difficulties of the task and work in whatever way suits you. I have told you how I learn to script, but at the end of the day you will do well in your own unique way. Not everyone enjoys practical work, some people learn more through reading, or maybe through listening to others talk about a subject. Just pick whatever helps you get the best understanding and use that method to work your way forward.

Good luck in your future endeavours and I hope you find your pride and joy in scripting.

3 Likes

Free models really helped me. They’re an excellent tool to learn off of.

1 Like