Skip to main content
TRACK B·FIVEM FUNDAMENTALS·Verified June 2026 · Lua 5.4 · ox_lib 3.x
Learning with an AI assistant?
Copies this lesson plus 2026 ground rules (no lua54 'yes', Cfx.re Portal, correct callback signatures) as a ready-to-paste mentor prompt.

FiveM natives: the toolbox

Natives are the buttons that make the game do things, and your real skill is knowing how to look one up. A native is just a built-in game function. FiveM ships thousands of them, and they do the real stuff: move a ped (a character), draw text, spawn a car, read someone's health. Nobody memorizes the list. Good developers look them up. You already know some Lua and you know there's a client side and a server side. This lesson teaches you to read a native straight from the docs, then proves you can by building a script that reads your position and health and teleports you cleanly onto the ground.

You'll build
A reusable native practice script: print your own coordinates and health, then teleport yourself to a coordinate and land safely on the ground.
Time
~22 minutes
You need
Your qu_hello mental model from Module 02, plus the official FiveM native reference open in your browser.
You'll learn
What a native is -> how to find one -> how to read the CLIENT/SERVER badge -> how to turn the docs into one small working script, line by line
Scripting fundamentals: natives, vectors, and debugging.
BEFORE YOU START

Find a native

Here's the deal: you don't remember natives, you find them. A native is a built-in function the game (or Cfx) hands to your script, and there are thousands. Look the one you need up in the official native reference, then use the Lua manual for the plain language stuff around it.

When you open a native, read three things before you use it:

  • The side badge. The docs call this the API set: a native is marked client, server, or shared (runs on both). A client-only native like GetEntityCoords will not run in a server_script, and a server-only one will not run in a client_script. Match the native's side to the file it lives in.
  • The arguments. The signature shows what to pass in and in what order, for example GetEntityCoords(entity). Pass the wrong type and you get nil or a crash.
  • The return value. Some natives hand you something back (coords, health, a handle); some just do a thing and return nothing.
A native is marked CLIENT. Can you call it from your server.lua?

No. A client native only runs in client scripts (loaded with client_script), and a server native only runs in server scripts. (A shared native runs in both.) The API-set badge in the docs tells you which file the call belongs in. Calling across the line is the single most common beginner native error. Every native you use in this lesson is a client native, which is exactly why the file you build is a client_script and not a server_script.

Keep reading the full lesson

Sign in to start, then unlock every step of this lesson and the full FiveM School with a membership.

Still ahead in this lesson
  • Build it
  • How it works
  • If something went wrong
  • What you can do now
  • Try it yourself

The remainder of FiveM natives: the toolbox is available to FiveM School members.