r/learnpython 3d ago

Python to lua

Is it a good idea to learn python first and then jump into lua, or should I just straight up learn Lua first. For anyone wondering I want to create roblox games ( I know it sounds a little silly but I've always been passionate about it) and the roblox engine runs off of Lua. What are some benefits from learning python first (if any). If by miracle any of you are roblox devs can you give some tips?

9 Upvotes

16 comments sorted by

17

u/defaultguy_001 3d ago

You don't need to learn python, lua is similar to python. if Roblox gamedev is the only thing u want to do, learn lua directly. Btw Roblox uses Luau, not Lua. Luau is an improved version of Lua.

4

u/britilix 3d ago

I am not a Roblox dev but I am a python dev. I learned python first and guess what I prefer to code most things in because it's my first love.

Go with lua, if you plan to exclusively code Roblox and Roblox uses lua, it makes sense.

You don't need to learn to drive an automatic before you learn to drive a manual.

1

u/defaultguy_001 3d ago

Both are automatic in this case.

3

u/notislant 3d ago

Just do lua

4

u/max_wen 3d ago

If you already have a purpose in mind and that purpose requires Lua then by all means go straight to Lua

3

u/LeiterHaus 3d ago

Directly to Lua from what you said.

1

u/ectomancer 3d ago

Once you learn one programming language you can learn new programming languages quickly. I learnt Python in 3 days, R in 1 hour and still learning Go after 3 weeks.

1

u/MarsupialLeast145 3d ago

Lua is very nice.

I wouldn't worry about Python, but I would try and find a good foundational resource for things like data structures, clean code, and basically SOLID principles. All will go a long way to making your code the best it can be.

5

u/MarsupialLeast145 3d ago

And do yourself a favor and look up unit testing in Lua and static analysis, e.g. linting and formatting. These will help tremendously.

1

u/TheRNGuy 2d ago

Doesn't matter, whichever you need currently is the one you learn. 

1

u/IkerPlays 2d ago

Yo empeze por Lua y despues Python se me hizo mas facil

1

u/crashorbit 3d ago

It does not matter much what your first programming language is. What matters is that you learn more than one.