> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/character-creator-and-select-and-apppearance/troubleshooting.md).

# Troubleshooting

This troubleshooting guide covers the most common problems with `cas-charcreator`, the dual-framework RedM character creator and character selection resource. Use it to diagnose multicharacter loops, black character-select screens, appearance and skin failures, barber conflicts, and `server.cfg` load-order mistakes on both VORP and RSGCore. For first-time setup, see the [installation guide](/script-documentation/character-creator-and-select-and-apppearance/installation.md); for tunables, see the [configuration reference](/script-documentation/character-creator-and-select-and-apppearance/configuration.md).

`cas-charcreator` is a dual-framework (VORP + RSGCore) character creator and selector with an appearance, barber, and wardrobe stack. It **auto-detects** the framework at runtime via `shared/framework.lua` (`GetResourceState rsg-core` / `vorp_core`); there is **no** hard framework dependency in `fxmanifest.lua`. Most field issues come from `server.cfg` load order, stopping the wrong stock resource, or framework ID-type mismatches (VORP ids are ints, RSG ids are strings).

Use the symptom tables below as `symptom -> cause -> fix`. Read the **General Debugging** section first if you do not yet know which framework was detected.

***

## General Debugging (do this first)

| Step                                    | What to do                                              | What you are looking for                                                                                                                   |
| --------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| 1. Enable dev mode                      | Set `CCConfig.DevMode = true` in the config             | Verbose client/NUI logging in F8 and extra server prints                                                                                   |
| 2. Confirm framework detection          | Watch the **server console** on resource start          | The line `[cas-charcreator] framework detected: rsg` **or** `[cas-charcreator] framework detected: vorp`                                   |
| 3. Read the server console, not just F8 | Spawn, DB, and ID-coercion errors print **server-side** | `pcall`-wrapped DB failures, kick reasons, missing-export spam                                                                             |
| 4. Confirm load order                   | Check `server.cfg` ordering (see below)                 | RSG: stop `rsg-multicharacter` + `rsg-barbers`, ensure cas. VORP: `vorp_core -> cas-charcreator -> vorp_character(shim) -> vorp_inventory` |
| 5. Check the F8 client console          | Reproduce the symptom with NUI open                     | Guard messages such as `fade guard kicked in (select)`                                                                                     |

If the framework-detected line shows the **wrong** framework (or never prints), nothing downstream will behave; fix detection and load order before chasing any other symptom.

***

## RSGCore (RSG) Issues

### Black select screen: character never renders

|                         |                                                                                                                                                                                                                                              |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Symptom**             | Selector screen stays black; the preview ped never appears. F8 shows: `fade guard kicked in (select)`.                                                                                                                                       |
| **Root cause**          | Unbounded `repeat`/`until` loops in `CCEngine.IsPedReadyToRender` / `LoadModel`, **plus** no spawn/stream step on RSG entry, so the ped model never finished streaming and the fade-in guard tripped and bailed.                             |
| **Fix / what to check** | Update to the build where those loops are **bounded** and `bridge/cl_rsg.lua` **pre-streams** the model/area on entry. Confirm `framework detected: rsg`. Re-test with `CCConfig.DevMode = true` and watch for the fade-guard line clearing. |

### Spawn -> roughly 1 to 2s -> black -> thrown back to select (looping)

|                         |                                                                                                                                                                                                                                                                                                                                       |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Symptom**             | Pick a character -> it spawns -> after roughly 1 to 2 seconds the screen goes black and you are kicked **back to the character-select screen**, repeating indefinitely.                                                                                                                                                               |
| **Root cause**          | cas was **not firing `OnPlayerLoaded`**, so `isLoggedIn` stayed `false`. The framework's session watchdog saw an un-loaded player and looped you back to select.                                                                                                                                                                      |
| **Fix / what to check** | Use the build where `bridge/cl_rsg.lua` fires **`RSGCore:Server:OnPlayerLoaded`** and **`RSGCore:Client:OnPlayerLoaded`** itself (these set `isLoggedIn` and boot HUD / inventory / jobs). Confirm `rsg-spawn` is replaced by cas (cas owns the spawn on RSG). This loop does **not** occur on VORP, which uses `vorp:initCharacter`. |

### "You Have Been Kicked For Exploitation" on character delete

|                         |                                                                                                                                                                                                             |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Symptom**             | Deleting a character immediately kicks the player: `You Have Been Kicked For Exploitation`.                                                                                                                 |
| **Root cause**          | The server coerced the citizenid with `tonumber()`. VORP ids are ints but **RSG ids are strings**, so `tonumber("abc123")` -> `nil` -> `DeleteCharacter(nil)` -> license/owner mismatch -> anti-cheat kick. |
| **Fix / what to check** | Use the build that passes the citizenid **as a string** on RSG (no `tonumber()` coercion). If you patched custom code, make sure delete/load paths never numeric-coerce an RSG citizenid.                   |

### Character age shows 0

|                         |                                                                                                                                                          |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Symptom**             | A created character's age displays as `0` in the UI/roster on RSG.                                                                                       |
| **Root cause**          | RSGCore **drops the custom `charinfo.age` field**, so the stored age is gone by read time.                                                               |
| **Fix / what to check** | Derive age from **`charinfo.birthdate`** instead of reading `charinfo.age`. Confirm the birthdate is being written and that the UI computes age from it. |

### New character has no appearance / preview ped is the default model

|                         |                                                                                                                                                                                                                                                                                                              |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Symptom**             | A brand-new RSG character spawns with **no custom appearance**; the preview/roster ped is the default model.                                                                                                                                                                                                 |
| **Root cause**          | The `playerskins` `INSERT` referenced a **non-existent `license` column**, so the insert **failed silently under `pcall`**, and no skin row was ever written.                                                                                                                                                |
| **Fix / what to check** | Use the build where the insert targets **`(citizenid, skin, clothes)`**. Verify the `playerskins` row exists for the character: `playerskins.skin` holds the **cas-format** skin JSON and `playerskins.clothes` holds the **RSG hash** format (for rsg clothing-reader interop). cas writes this row itself. |

### rsg-hud spam: "No such export IsBathingActive in resource rsg-bathing" (and broken/garbage ped)

|                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Symptom**             | Server console / F8 repeatedly logs: `No such export IsBathingActive in resource rsg-bathing`. Often paired with a **broken or garbage-looking ped** and `nil`-index Lua error spam after every reskin (post-bath, prison release, radial menu).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Root cause**          | Two problems with the **stock `rsg-appearance`**. (a) It **corrupts the ped**: in CitizenFX, `RegisterCommand` is a name-keyed **multimap** that invokes **every** handler registered for a command name, so on each `loadskin` **both** cas's `loadskin` and the stock `rsg-appearance`'s `loadskin` fire. The stock resource reads the **cas-format** `playerskins.skin` and re-applies it through its own `rsg-creator-format` loaders, producing a broken ped plus `nil`-index spam; its `rsg-appearance:client:ApplyClothes` event also double-applies. cas can never be reliably authoritative while the stock resource runs. (b) It **cannot be cleanly stopped**: `rsg-bathing` declares `dependency rsg-appearance` (and `dependency rsg-wardrobe`), so stopping `rsg-appearance` **cascade-stops `rsg-bathing`**, and `rsg-hud` then can't find its `IsBathingActive` export. The fxmanifest **`provide`** directive does **not** help here (FXServer still starts the real named dependency).                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Fix / what to check** | **Replace** the stock `rsg-appearance` resource **folder** with the CAS **stub resource** (same name) shipped in this package, and **delete** the stock `rsg-wardrobe` folder; let the stub `ensure` normally; do **not** `stop` it. Park or delete the stock `rsg-appearance` folder so only the stub holds that name. The `rsg-appearance` stub keeps the name present so `rsg-bathing`'s `dependency 'rsg-appearance'` resolves and starts, answers the read-only exports `rsg-hud` (`IsCothingActive`) and `rsg-essentials` (`GetClothesCurrentComponentHash`, `GetBodyCurrentComponentHash`) call with safe values (`false`/`0`), and carries **no** appearance logic; it also declares `provide 'rsg-wardrobe'`, which covers `rsg-bathing`'s `dependency 'rsg-wardrobe'` once the stock `rsg-wardrobe` folder is gone. With the stub in place there is no second appearance system, and cas's `loadskin` and `ApplyClothes` are the **sole** handlers. On RSG you still only `stop rsg-multicharacter` and `stop rsg-barbers` (there are **no** `stop rsg-appearance` / `stop rsg-wardrobe` lines). Keep `rsg-bathing`, `rsg-hud`, and `rsg-essentials` running; they work against the stub. **Cosmetic limitation:** because the stub returns `0`, toggling a bandana off via `rsg-essentials` will not restore the previous neckwear or a male's beard. This is cosmetic only and throws no error. |

***

## VORP Issues

### Cascade warning: never hot-stop `cas-charcreator` alone on a live VORP server

|                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Symptom**             | After a `stop cas-charcreator` (or `restart cas-charcreator` alone) on a live VORP server, **clothing breaks**: `vorp_inventory` clothing stops working, components/outfits fail.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **Root cause**          | The active `vorp_character` is a **COMPAT SHIM** that **depends on `cas-charcreator`** (it proxies `GetPlayerComponent` / `GetAllPlayerComponents` / `GetPlayerSkin` / `OpenOutfitsMenu` to cas). Stopping cas alone **kills the shim**, which breaks `vorp_inventory` clothing downstream.                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Fix / what to check** | **Never hot-stop `cas-charcreator` by itself.** Restart the **chain in order** instead: `vorp_core -> cas-charcreator -> vorp_character(shim) -> vorp_inventory`. Keep the shim ensured **after** cas-charcreator. The server must load exactly **one** resource named `vorp_character`, and that one must be the cas compat shim (for example `resources/[CAS]/vorp_character`). The original stock `vorp_character` must **not** be loaded by FXServer: either delete it, or keep it outside any folder the server scans or ensures. FXServer only starts resources under `[bracketed]` category folders or paths you explicitly ensure, so a stock copy left outside those locations is never started. Do not re-activate it. |

### Double barber: two blips, prompts, or UIs at the same chair

|                         |                                                                                                                                                                                      |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Symptom**             | At a barber chair you see **two blips**, two prompts, or two overlapping menus.                                                                                                      |
| **Root cause**          | The **stock barber** (`vorp_barbershop` on VORP, `rsg-barbers` on RSG) was left enabled **alongside** cas's own barber.                                                              |
| **Fix / what to check** | Run exactly **one** barber. Either `stop vorp_barbershop` (VORP) / `stop rsg-barbers` (RSG), **or** set `CCConfig.Shops.barber.enabled = false`. Pick **one** approach, not both-on. |

***

## Quick Reference: correct setup

### RSG (RSGCore)

```
stop rsg-multicharacter
stop rsg-barbers
# NO stop rsg-appearance / stop rsg-wardrobe lines.
# Instead: REPLACE the stock rsg-appearance folder with the CAS stub
# (same name) and DELETE the stock rsg-wardrobe folder. The stub
# declares provide 'rsg-wardrobe', so it supplies that name.
ensure cas-charcreator
```

* cas-charcreator owns the **entire appearance + wardrobe stack** on RSG. The package ships one RSG stub, `rsg-appearance` (same resource name), that replaces the stock folder; it declares `provide 'rsg-wardrobe'`, so you delete the stock `rsg-wardrobe` folder and no separate wardrobe stub is needed. The stub `ensure`s normally so `rsg-bathing`'s two hard dependencies both resolve. Keep `rsg-bathing`, `rsg-hud`, and `rsg-essentials` running against the stub. See the `IsBathingActive` entry above for why running the **stock** `rsg-appearance` corrupts the ped.
* cas owns the spawn (replaces `rsg-spawn`) and fires `OnPlayerLoaded` itself.
* Hybrid storage: `playerskins.skin` = cas-format JSON, `playerskins.clothes` = RSG hash format.
* Money forced to cash via `CCConfig.RsgMoney`.

### VORP

```
# No framework-swap stop lines.
stop vorp_barbershop          # OR set CCConfig.Shops.barber.enabled = false (pick ONE)
# Load order:
ensure vorp_core
ensure cas-charcreator
ensure vorp_character          # the [CAS] COMPAT SHIM (depends on cas)
ensure vorp_inventory
```

* The only `vorp_character` the server loads must be the \[CAS] compat shim (for example `resources/[CAS]/vorp_character`). The stock `vorp_character` must not be loaded: delete it or keep it outside any folder the server scans or ensures, because FXServer only starts resources under `[bracketed]` category folders or explicitly ensured paths.
* Spawn handoff uses VORP's native `vorp:initCharacter` (sets `IsInSession`), so there is no OnPlayerLoaded loop.
* **Never** hot-stop `cas-charcreator` alone (see the cascade warning above).

***

## Notes on expected flow (not bugs)

* After **creating** a character, the flow returns to the **SELECT** screen; the new character appears in the roster. This is intended.
* Picking a character spawns at its **last saved position**, or `CCConfig.SpawnPoints[1]` for a brand-new first-time character.
* The spawn picker is **off by default** (`CCConfig.SpawnSelector = "never"`).
* DB tables (`cas_mugshots`, `cas_player_locale`, `outfits`) are created **automatically** on first start; there is no `.sql` to import. Appearance is applied by cas's own engine (CCEngine); character data lives in the framework's existing tables.

***

## More resources and support

* [Buy CAS Character Creator (escrow)](https://codeaftersex.com/script/character-creator?v=escrow)
* [Preview video (YouTube)](https://youtu.be/U8ZZdky3a0I)
* [Open-source companions (GitHub)](https://github.com/codeaftersex/cas-charcreator-companions)
* [Support Discord](https://discord.gg/codeaftersex)
* [All CodeAfterSex scripts](https://www.codeaftersex.com)

***

*Part of the* [*CodeAfterSex*](https://codeaftersex.com/) *RedM and FiveM script catalogue. Buy CAS Character Creator:* [*purchase with escrow on CodeAfterSex*](https://codeaftersex.com/script/character-creator?v=escrow)*.*
