> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/free-resources/mango-positions/troubleshooting.md).

# Troubleshooting

The handful of things that go wrong, and what each one means.

## `attempt to index a nil value (global 'lib')`

ox\_lib isn't loaded. `dependency 'ox_lib'` in a manifest only fixes **start order** — it does not make `lib` available. The manifest needs:

```lua
shared_scripts {
    '@ox_lib/init.lua',
    'config.lua',
}
```

Also check that `ox_lib` starts before `mango_positions` in your `server.cfg`, and that the folder is named exactly `ox_lib`.

## The command does nothing

The ace check is refusing you. Add yourself:

```cfg
add_ace group.admin command.mpos allow
```

Make sure your identifier is actually in the group named by `Config.Restricted`. The server console prints the exact line on startup.

Note that being denied says so in chat — if you get **no** message at all, the command is not registered, which means the resource did not start. Check the console for a startup error rather than a permission one.

## `/mprop` or `/mfit` says unknown command

They are not commands any more. `/mpos` opens the tool and `1`, `2` and `3` move between the ped, prop and fit tools once you are in.

If you preferred a command per tool, give `Config.PropCommand` and `Config.FitCommand` a name in `config.lua` — they are `false` by default, and registering them costs no extra ace line.

## `this command must be run in-game`

You ran it from the server console. The tools need a player — use in-game chat or the F8 console.

## The ghost doesn't appear

The ped model is still streaming. The tool waits about a second; on a busy server, close and reopen. If it never appears, check F8 for a model-loading error.

## The Z is wrong

`Config.SnapToGround` snaps to the ground **directly beneath** the ghost. In an MLO with stacked floors that can be the level below. Set it to `false` and set the height yourself with `↑` / `↓`.

## The player faces the wrong way

Heading comes from the **ghost**, not from you. Rotate it with `←` / `→` to face the direction a player should face when they arrive, then copy.

## Nothing highlights in the fit tool

Watch the aim line: it shows exactly how far the picker reaches and where it lands. While it stays white it is not on anything takeable.

The reach is `Config.FitReach` metres — 12 by default. Get closer, or raise it. Baked-in MLO geometry is not an entity and cannot be attached to; props, vehicles and peds all work. In freecam the line is cast from the lens rather than your body, so aim with the camera.

## The fitted offset looks right in-game but wrong in my script

Check you are attaching with the same bone and flags the tool uses:

```lua
AttachEntityToEntity(ped, target, 0,
    offset.x, offset.y, offset.z,
    rot.x, rot.y, rot.z,
    false, false, false, false, 2, true)
```

Bone index `0` and rotation order `2` are what the offset was measured against. A different bone moves the origin the numbers are relative to.

## The arrow keys are doing something else

Older versions did not fully disable the arrow keys and `3` in the ped tool, so a phone or menu resource could act on them at the same time. Update to the current version.

## The ghost is left behind

It shouldn't be — the tools clean up on close and on resource stop. If one survives a crash, restart the resource and it will be removed.

## Nothing pastes

The clipboard goes through ox\_lib. If it fails silently, check F8 — every copy is printed there too while `Config.PrintToConsole = true`.
