Couldn't learn how to script

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