When you buy/sell at a limit price, you set the price you want to buy/sell at. The order is executed when a buyer/seller wants your shares. Like with a market order, you won’t necessarily get the exact price you wanted.
With limit orders you’ll sometimes get a price above your limit price (when selling) or below (when buying). In other words, to restate, limit orders aren’t subject to slippage.
You’ll either get a better price, or the price you asked for.
The danger with limit orders is that if you are trying to take profits, and you set your limit too high (or are trying to buy low and set it too low) you can miss an opportunity to fill your order.