How would i learn scripting

Ive been wanting to learn how to write script, where would be a great place to start?
Thanks in advance!

5 Likes

I recommend the book “Roblox Game Development in 24 Hours: The Official Roblox Guide”

When I first started scripting I would go through some Free Modeled items, I’d look through the scripting and try to make sense of it I practiced the code for a bit, Then I found out the Youtubers where posting them on youtube.

Although mostly everyone watches how to code on youtube.

Coding isn’t your typical pastime—it’s a journey that demands time, dedication, and a deep understanding of various principles. To excel in the realm of professional programming, one must possess a solid grasp of algebra, data structures, algorithms, and the intricate workings of computer hardware. Mastery in this field isn’t achieved overnight; it requires persistence and a willingness to tackle complex problems head-on.

Now, while coding may seem like a fun endeavor, the reality is that it’s an intellectually challenging pursuit. Countless hours are spent unraveling problems, with solutions often coming after days of contemplation. It’s a process that demands patience and resilience, traits that are essential for success in the field.

But if you’re still keen on pursuing coding, here’s a roadmap I wish I had followed:

Start by understanding the fundamentals of how CPUs process information and delve into the world of binary. This foundational knowledge will provide invaluable insights into how computers execute code.

Once you’ve grasped these concepts, immerse yourself in Lua, a versatile scripting language. Experiment with it, break things, and learn by doing. Understanding Lua sets the stage for delving into more advanced topics.

Next, focus on mastering data structures, algorithms, and optimization techniques. Dive into formal language theory, logic, and Boolean algebra to sharpen your problem-solving skills.

Explore advanced concepts like state machines, machine learning algorithms, and pathfinding. These areas offer exciting opportunities for innovation and growth.

As you progress, delve into system design principles and architectural paradigms. Familiarize yourself with functional programming, object-oriented programming (OOP), and data-oriented development.

Enhance your mathematical proficiency, particularly in discrete mathematics, as it underpins crucial concepts like graph theory and database design.

Finally, continuously assess your knowledge and fill any gaps through ongoing learning and exploration.

This is just the tip of the iceberg, goodluck.

3 Likes

I started with simple things like changing gravity and pressing buttons.

Highly recommend watching the extremely basic tutorials and building off from there.

The DevHub is a great resource and Roblox’s new assistant AI can quickly explain any questions you have. Good Luck!

1 Like

In addition to what everybody else said. You don’t always have to write the script from scratch because there are many resources and documentation that either guide you or provide ready to use scripts for you to utilize.

For example, let’s say a sandbox tycoon placement system that so hard and time consuming. You don’t have to write that from scratch as other users in here provide a module that you can utilize for your game.

Note that not understanding these ready to use scripts can lead to bugs and other problems.

Good luck on your scripting journey.

And don’t forget my fave the official Roblox Education site

Youtube videos are good, but the best way to learn scripting is to try it yourself. The amount you learn from getting stuck in a problem, and having to break it down and solve it yourself is way more than any youtube video can provide.

That being said, before you can start small programming problems you’ll probably need to understand some fundamentals of programming.
Basically all programming languages share similar concepts such as:

  • Variables
  • Assignment
  • Data types
  • Data structures
  • Functions
  • If, else statements
  • Logic and conditions
  • Iteration
  • String manipulation
  • etc

If you understand these concepts - you’ll be pretty well versed in most languages, because even though the syntax is different, the concepts are the same.
Personally, I learnt most of these concepts on a website called scratch, its a platform where kids can program small projects using blocks rather than typing.

If you’re looking to jump straight into roblox studio and learn the engine alongside programming I’d recommend this video - https://www.youtube.com/watch?v=sGS0WZgh3SE

But like I said at the start, just giving it a go yourself is the best way to learn.

For example, when I first started learning, one of the first things I made was a part, which when clicked, would make the player run at superspeed. Problems like these are great because they’re small and digestible, whilst still being complex enough that you have to break them down and solve each part bit by bit.

For example, you may split the problem into the following questions:

  • How do I detect when a part is clicked?
  • How do I change a players speed?

Doing research into these questions (simply by googling and looking at the roblox documentation), you’ll discover more things such as humanoids and click detectors and so on.

And so from this one problem alone, you would have learnt:

  • The click detector class
  • The humanoid class
  • Events
  • Connecting events to functions
  • Parameters
  • Referencing a players humanoid given the player object
  • Editing properties of a class (changing walkspeed of the humanoid)

Then you can slightly edit the problem, such as:

  • Make it so that rather than clicking the part, the player has to step on it.
  • Make it so that rather than giving you superspeed, you jump really high.

And doing this will reinforce those concepts you’re starting to learn.

Then its just rinse and repeat, the only way to learn really is to practice. Give yourself more problems, get stuck on those problems, then solve them. Gradually increase the difficulty and with time you’ll get better.

Hope that helps, sorry if this response is a bit all over the place.

1 Like

Thanks to everyone who has commented, i appreciate it
<3

Don’t use a book to learn scripting, there’s so many more tutorials online and on Youtube, it doesn’t make sense.