you can first take a course, when i started learning lua, i immeadiatly tried to do an full game, but i failed because i didnt know nothing, i just had over-confidence, and it seems that youre commiting the same error. try doing scratch first to learn coding logic.