(CNN) — Los Angeles International Airport, better known as LAX, has announced that it will permit travelers to bring small amounts of legal marijuana through security in their carry-on bags.

But wait: That doesn't mean you can toke up at the airport.

Pot is legal in several US states, but not on the federal level, so you still need to study up before packing your bags on your way out of LA.

In 2016, California passed Proposition 64, aka the Adult Use of Marijuana Act . The passing of this proposition means that as of of January 1, 2018, it is legal in California "for individuals 21 years of age or older to possess up to 28.5 grams of marijuana and 8 grams of concentrated marijuana for personal consumption."

LAX is honoring the same regulations in the airport, allowing travelers over the age of 21 to enter the airport and pass through security with the permitted amounts of marijuana.

"The Los Angeles Airport Police Department will allow passengers to travel through LAX with up to 28.5 grams of marijuana and 8 grams of concentrated marijuana," reads a statement on LAX's official website , which was posted in September 2018.

Related content Is this the most luxurious airport terminal in the world?

That said, whether you can get busted for traveling throughout the US with pot depends on where you're going. If you're traveling between two states where the substance is legal, such as California and Vermont, you should be all right upon landing.

But if your flight is going from LAX to a place where marijuana isn't legal, it depends on the laws in the state or country where you arrive. You are still subject to local laws wherever you might be going, even if you carry a valid weed prescription for the place where you live.

Planes themselves are also subject to federal law, which means you could still face fines or detention for carrying pot, even if Los Angeles police decline to prosecute -- at minimum, you don't want to miss your flight by getting held up.