I want to learn to code, Is there a way I can learn?
If you're new to programming/scripting/coding, you might want to look at things like Scratch, and for more advanced concepts BYoB4. If you've already used those, or just want to use Lua, you should consider looking at the tutorials on the Roblox wiki. You can't use the Absolute Beginner's Guide anymore because as of the 6th Jan it was deleted by Urist.
If you've come from another programming language or you've grasped the basics of working with Lua in Roblox, you may want to look at LearnXinYMinutes as they provide all of the information that an experienced programmer needs in order to grasp a language, in the bare minimum required to use it. Also the Lua PiL, which explains all of the details of how Lua works.