Learning Lua for FiveM

I have seen a few posts about learning lua but they are all outdated and I wanted a more up to date guide/ support on how to go about learning lua and scripting on fivem.

I know the basics of lua but just don’t understand how how start from scratch or construct script on my own.

Thanks for any help provided :slight_smile:

If you already know a tad of lua, your absolute best bet is to edit already existing, not-so-complicated lua scripts to your needs.

You don’t need to know lua for that (well, technically you do, but that’s not the point). You need to learn to think logically about the proper application of a programming / scripting language. Coding is actually the easy part, as it’s only rewriting the logic behind the script (program) into machine-readable form.

Ultimately, the best thing you could do is try, try and try. Do your research on the language’s capabilites, as well as FiveM natives. You can learn a lot by reading other people’s code, too - just focus on the logic behind the script and perhaps think about how it could be improved.

1 Like

Surprised nobody linked this https://docs.fivem.net/docs/scripting-manual/ it literally has everything you need to know

1 Like

I’ve already done this with fivem test servers but it just doesn’t help me.