How can I improve scripting (or coding)?

I know that you have to practice to improve scripting and it’s obvious to know that a lot of people here have asked those types of questions on how to script but, I genuinely don’t know how to improve scripting myself. How can I improve scripting, what I’m thinking right now is to practice, but what should I practice??

1 Like

I think this topic has been discussed a lot. Please use the search bar next time.

The only advice I can give is to keep learning scripting from beginners series to advance. There’s nothing such as the fastest way to learn it, it takes time.

YouTube tutorials, TheDevKing, and roblox in general. These are all helpful and should hopefully give you some tips and make you improve.

1 Like

Watching YT tutorials, reading on the dev forum and looking in the wiki is what I can suggest.

I had the same issue.
I didn’t know where to start, but i would suggest you to refer Alvin,

It would be a good start and u can gain asap from this :slight_smile:

Start with basic obby block scripting ( Rotation , Kill Bricks)
Advance into teleportations, and slowly u would catch the pace

AlvinBlox uses bad practices, only shows what is blatantly obvious, and never actually teaches you what to do and he just copies the general summary of an instance and its properties.

2 Likes

You should use The Devhub and practice setting up differen’t situations for differen’t use cases.

1 Like

I agree, but i would suggest it as a START for scripting, but ik u would know better on this as a programmer
I would upvote

@ItzMeZeus_IGotHacked Yes I know but nothing is really helping me, and it’s a kind of different topic. And I’m following that advice right now.

@xPoppyo I don’t think youtube is best for me

@WinkleSociety I will be doing that, except youtube.

@arnav24avi10, as what @Narunzo said, I agree that it uses bad practices.

@Narunzo I’ll use the devhub for contributing my scripting.

======================================================================

I still want to know what should I be practicing, specifically what should I start with?

It’s better to learn good practices first than to work with a bad habit you learned from someone who doesn’t explain what they’re teaching. I wouldn’t recommend AlvinBlox for any sort of scripting information. He explains what a function is and that it can pass strings and numbers but doesn’t explain that they’re parameters and how to use them for more than just the situation he’s using in the videos. He covers how to use stuff but doesn’t teach what they actually do and how you can make your own models and scripts with them. I would rather read up on something and learn the correct way so I could use what is available to me the correct way for a different script instead of watching a video on how to do a specific use case and not learn anything about what he’s doing.

2 Likes

Learn complex math functions and then youll be good to go

You should probably work on handling events and making sure you don’t run events when they aren’t needed to be on the server. For example, let’s say you want a light to turn on when a player gets close to a building but you don’t want to constantly check for players on the server or constantly run a script on the client. Instead you should use an event that only runs a function when something conditional happens like a part being touched. Additionally you could use the Disconnect function on events you want to have a cooldown on instead of using debounces and continuing to run code where it’s not needed. These are just some examples of one of the many things you can learn about as you practice scripting. But you mainly learn as you create different scripts for different uses. You’ll also want to look into creating efficient systems such as OOP with module scripts.

You should do some personal projects for yourself that you want to do that involves coding. Because while doing them you will inevitably reach many roadblocks along the way that you don’t know how to overcome them with your current knowledge so you will feel the urge to research about them either on devforum or reading API reference manuals, which will improve your understanding behind the logic of coding as you keep working on your personal project while doing stuff that you’re willing to do.

If you feel like you don’t know how to overcome a roadblock and lose motivation after researching for so long, that’s fine. Move onto other stuff for the time being. Because forcing yourself too much on passing that one roadblock will probably not help you understand the logic behind coding more, it might even make you lose interest in coding for a good while because it might put you in a mindset that would make you think that coding is too hard and not fit for you.

Another way to improve your coding style is reminding yourself that most of the time there is more than one way to do something. You should check for any other way to do one thing and see which one works better for you if there is one. That way you will learn to approach a problem in more than one way which most likely help you in future.

And you should know that you can’t know everything about a language or API at once, no one does. You only learn what you need to know about when the time is right. This way instead of spending time on reading random API references you don’t even need to know about and get yourself bored for nothing, you learn about the ones that you need to know and move on with your project.

Also ignore @IProgramForFun’s reply, learning complex math functions will not help you in any way for understanding coding logic more. You only learn complex math functions when you need to and only learn the necessary ones, otherwise learning them will not give you anything beneficial.

I’m not a scripter myself but I think that doing some continuous practices of lines and trying out things for yourself will be beneficial.