You have absolutely no reason to use other code to learn it in my opinion. Learn Lua, then set a goal. Figure out what procedures and design it takes to achieve that goal, then if you need to, see how others did it. Reverse engineer your idea in your mind. If you have to move an arm, find procedures on bone animation. If you have to resize a car, figure out which procedures you would need to scale an element. Etc. Go through the wiki, and look at the tools you are offered.
You're wasting your time figuring out how a couple straight forward lines of code work.