How to Make a FiveM Loading Screen: Music and Progress Bar
Learn how to make a FiveM loading screen: the loadscreen manifest entry, music, a progress bar, handover data, and replacing the ESX, Qbox or QBCore default.

- Applies to
- FiveM Legacy and FiveM for GTAV Enhanced (early access); Cfx.re loading screen docs and FiveM client source read on December 2, 2026; cfx-server-data example-loadscreen (September 23, 2026); esx_loadingscreen in esx_core (October 18, 2026); loadscreen v2.2.1 from the Qbox recipe; QBCore qb-loading 1.2.0 (August 24, 2026)
- Last verified
On this page
- Direct Answer
- What a FiveM loading screen is
- How to change the default FiveM loading screen
- How to make and install a custom FiveM loading screen
- How to add music to a FiveM loading screen
- How to add a loading bar: the loadProgress event
- Show the player’s name: handover data
- Hide the busy spinner
- When the loading screen closes: manual shutdown
- Loading screens on FiveM for GTAV Enhanced
- Troubleshooting
- Next Steps
Direct Answer
A FiveM loading screen is an HTML page inside a resource. To make one, put an index.html (plus its images, CSS and music) in a resource folder, add loadscreen 'index.html' and a files list naming every file to its fxmanifest.lua, add ensure with the resource name to server.cfg, and restart the server. The page shows while the game loads after a player joins. Only one loading screen is displayed, so stop the one your framework or recipe already runs: esx_loadingscreen on ESX Legacy, loadscreen on Qbox, qb-loading on QBCore. Music, a progress bar and the player’s name all come from documented NUI features covered below.
What a FiveM loading screen is
The Cfx.re documentation calls the loading screen a special NUI frame “called loadingScreen, which is shown during loading of FiveM, instead of the default client-side loading screen or the game loading screen, after joining into a server.” NUI is FiveM’s HTML interface layer, which the docs describe as “Currently using the Chromium Embedded Framework”. In practice the loading screen is a web page, and HTML, CSS and JavaScript work in it as they do in a browser.
A resource declares its page with the loadscreen entry in fxmanifest.lua. The resource manifest reference describes it in one line, “Sets the HTML file specified as the game loading screen”, and the page must also be listed with file or files so that clients download it. The entry also accepts a web address instead of a file, as the docs show with loadscreen 'https://my-server.example.com/loadscreen/'.
The loading screen works the same way on every kind of server: roleplay, racing, PvP, zombie or a freeroam server without a framework. Only the shutdown step, covered further down, depends on which spawn or character resource you run.
Only one loading screen is shown
When a player joins, the FiveM client collects the loadscreen entry of every running resource into a list that starts with the built-in page nui://game/ui/loadscreen/index.html. It then opens a single frame with nui::CreateFrame("loadingScreen", loadingScreens.back()), the last entry in that list. Two running loading screen resources therefore never show side by side; one of them is used and the other is ignored. The client still reads loadscreen_manual_shutdown and loadscreen_cursor from every resource that has a loadscreen entry, so a leftover stock screen can change when your screen closes even though it is not displayed. Keep exactly one running.
How to change the default FiveM loading screen
To change the loading screen, first find the one your server already runs, because the official recipes differ.
| Server type | Loading screen in the recipe | How it starts | How it closes |
|---|---|---|---|
| FiveM Basic Server (Legacy) | example-loadscreen is downloaded with cfx-server-data but not started | The recipe’s server.cfg ensures only mapmanager, chat, spawnmanager, basic-gamemode and hardcap | spawnmanager calls ShutdownLoadingScreen() |
| FiveM Basic Server (Enhanced) | None: the recipe copies only basic-gamemode, mapmanager, spawnmanager and two maps | Not applicable | spawnmanager |
| ESX Legacy | esx_loadingscreen inside the [core] folder | ensure [core] | Its own client script, plus esx_multicharacter |
| Qbox | loadscreen v2.2.1, unzipped to resources/[standalone]/loadscreen | ensure [standalone] | qbx_core calls ShutdownLoadingScreenNui() |
| QBCore | qb-loading | The line or category folder in your server.cfg that starts it | qb-multicharacter calls ShutdownLoadingScreenNui() |
| vMenu, StreetKings, other game modes | Check the mode’s own resources for a loadscreen entry |
ensure with a bracketed category name such as [core] starts every resource in that folder; the server commands reference says that start, stop and ensure all accept “a category name”. On ESX and Qbox you cannot remove the stock screen by deleting an ensure line. Move esx_loadingscreen or loadscreen out of its category folder or delete it, then add your own.
How to make and install a custom FiveM loading screen
These steps apply to FiveM Legacy and FiveM for GTAV Enhanced, with the Enhanced notes in their own section below.
-
Start from the official example. Cfx.re’s
example-loadscreenresource, part of cfx-server-data (last changed September 23, 2026), is a complete loading screen with four files:index.html,keks.css,bankgothic.ttfandloadscreen.jpg. On a Legacy server built from the FiveM Basic Server recipe it is already in your resources folder. Copy the folder, give it a new name, and replace the files with your own. -
Write the manifest. This is the example’s
fxmanifest.lua:version '1.0.0' author 'Cfx.re <root@cfx.re>' description 'Example loading screen.' repository 'https://github.com/citizenfx/cfx-server-data' files { 'index.html', 'keks.css', 'bankgothic.ttf', 'loadscreen.jpg' } loadscreen 'index.html' fx_version 'bodacious' game 'gta5'List every file the page loads under
files: images, fonts, CSS, JavaScript, music and video. A file that is not listed is not downloaded by clients. Larger resources use patterns instead of single names: Qbox’sloadscreenlists'html/**'andqb-loadinglists'assets/**'. The manifest reference namesceruleanas “The current FXv2 resource version”, so new resources can usefx_version 'cerulean'. -
Build the page. Write
index.htmlas a normal web page. Point to images, CSS and audio with paths relative to the resource, as the example does with<link href="keks.css" ...>andbackground-image: url(loadscreen.jpg). -
Add the optional manifest lines you need. Each one goes into the same
fxmanifest.lua:Line What it does (Cfx.re docs) loadscreen_cursor 'yes'Shows the NUI cursor. The screen always has mouse and keyboard focus, but “the cursor is not shown by default for legacy reasons” loadscreen_manual_shutdown 'yes'“Prevents the loadingscreen NUI from shutting down after loading the game data, where you’d usually see the bridge. Can then be closed with SHUTDOWN_LOADING_SCREEN_NUI.” Add the cursor line if your page has buttons, a volume slider or links. Read the shutdown section below before you add the second line.
-
Start it from
server.cfg. Put the folder in your resources directory and add one line with the folder name:ensure my-loadscreenensure“Restarts the resource specified in the argument, if it was started. If it wasn’t, starts the resource specified in the argument.” If the server is already running, typerefreshin the console first, which “Rescans the resources folder and loads all resource manifests in them”. The script installation guide covers folder levels and start order. -
Remove the old one and test. Stop or remove the screen your recipe installed (see the table above), restart the server and join it. The loading screen only appears while a client loads into the server, so every change needs a new join to be seen.
How to add music to a FiveM loading screen
Music needs no game API: an HTML <audio> element plays it. QBCore’s qb-loading does exactly that:
<audio autoplay loop id="audio" src="/assets/audio/noncopyright.mp3"></audio>
Its app.js then sets the starting volume with audio.volume = 0.05; and toggles playback with audio.play() and audio.pause().
Players do not have to click before the sound starts. In the FiveM client source, the client starts its embedded browser with the switch AppendSwitchWithValue("autoplay-policy", "no-user-gesture-required"), so an autoplay attribute works in NUI. Three things decide whether players actually hear the track:
- The file must be listed in
files.qb-loadingcovers its audio folder with'assets/**'. - A low start volume and a mute control are worth adding. Qbox’s
loadscreenstarts atloadscreen:initialAudioVolume 10(out of 100), shows audio controls, mutes onSpaceand remembers the volume each player sets. Its manifest also setsloadscreen_cursor 'yes', so players can use those controls with the mouse. - Video works the same way through a
<video>element.qb-loadingships a commented-out<video ... autoplay loop muted>block forfreestockvideo.mp4. Qbox’sloadscreen.cfgadvises: “If your custom video isn’t working, try to convert it to different codecs & formats (such as webm).”
On a Qbox server you can change the music without touching code: put your track in html/assets/music and keep loadscreen:music on (it is on by default). The resource’s handover.js lists the files in that folder when the resource starts, so restart the resource or the server after adding a track. Its other settings are convars such as loadscreen:background (image, video, embed or a CSS background) and loadscreen:serverMessage. The loadscreen.cfg file in the resource lists them all, but its first line says “this file is an example!”: copy the convars you want to change into server.cfg, as the Qbox recipe does with setr loadscreen:externalShutdown true, or run the file with exec @loadscreen/loadscreen.cfg.
How to add a loading bar: the loadProgress event
The client sends loading events to the page as message events. The docs explain that you handle them “by setting window.onmessage or by using window.addEventListener with ‘message’ as the first argument, and checking the eventName value inside the event’s data field.” This is their progress bar example:
<progress id="loading-bar" value="0" max="1"></progress>
<script type="text/javascript">
window.addEventListener('message', (event) => {
// ensure that we are handling the loadProgress event
if (event.data.eventName !== 'loadProgress') return;
// use the event's data to fill up the loading bar
document.getElementById('loading-bar').value = event.data.loadFraction;
});
</script>
loadFraction is a number between 0 and 1. In the client source it is sent as 0.0 when the “before map loaded” stage starts and as 1.0 when the session stage ends, with values in between computed from the client’s stored load timings. ESX’s esx_loadingscreen multiplies it by 100 for its percentage and treats loadFraction >= 1 as the end of loading.
The full event list and what each event carries
The docs list the event names. The fields come from the client source (LoadingScreens.cpp):
| Event | Fields in event.data | When it fires |
|---|---|---|
loadProgress | loadFraction | Overall progress, 0 to 1 |
onLogLine | message | Status text such as “Entering session”, “Setting up game”, “Initializing session” or “Starting game” |
startInitFunction | type | A loading stage starts, for example INIT_BEFORE_MAP_LOADED or INIT_SESSION |
startInitFunctionOrder | type, order, count | A group of init functions starts |
initFunctionInvoking | type, name, idx, count | One init function starts |
initFunctionInvoked | type, name | One init function finished |
endInitFunction | type | A loading stage ended |
startDataFileEntries | count | Map data files start loading |
onDataFileEntry | type, isNew, name | One data file entry is loaded |
performMapLoadFunction | idx | One map load step runs |
endDataFileEntries | none | Map data files are done |
The official example builds its bar from initFunctionInvoking (data.idx / count) and performMapLoadFunction, and prints each onLogLine message. Its September 23, 2026 fix handles “unknown init types such as INIT_CORE”, so a handler should not assume it knows every type value.
Show the player’s name: handover data
A server script can pass data to the page while the player connects. The docs: “Server scripts can specify data pairs to send to the client loading screen using the handover function in the playerConnecting event. This data will be passed to the loading screen in the window.nuiHandoverData property.” Their example has two parts. The server script:
AddEventHandler('playerConnecting', function(_, _, deferrals)
local source = source
deferrals.handover({
name = GetPlayerName(source)
})
end)
And the page:
<h1 id="namePlaceholder">Welcome, <span></span></h1>
<script type="text/javascript">
window.addEventListener('DOMContentLoaded', () => {
console.log(`You are connecting to ${window.nuiHandoverData.serverAddress}`);
// a thing to note is the use of innerText, not innerHTML: names are user input and could contain bad HTML!
document.querySelector('#namePlaceholder > span').innerText = window.nuiHandoverData.name;
});
</script>
The client also adds serverAddress, “the current IP/port used for the client->server connection”. Keep the docs’ warning in mind: player names are user input, so write them with innerText. Qbox’s loadscreen uses this mechanism for all of its settings: its handover.js reads the loadscreen:* convars on playerConnecting and sends them, with the player name and the server name, through deferrals.handover.
Hide the busy spinner
The busy spinner in the bottom right corner is a server setting, not part of your page. The docs give this server.cfg line:
setr sv_showBusySpinnerOnLoadingScreen false
setr makes it a replicated convar, which the convars documentation describes as “available on the client side to get the value, but you will only be able to change the convar value from the server side.”
When the loading screen closes: manual shutdown
By default, “the loading screen will show until SHUTDOWN_LOADING_SCREEN is called”. On a server without a framework, spawnmanager makes that call (ShutdownLoadingScreen()) when it spawns the player.
With loadscreen_manual_shutdown 'yes' the page stays up until a script calls SHUTDOWN_LOADING_SCREEN_NUI (ShutdownLoadingScreenNui() in Lua). The docs say this lets you “add a custom fade-out effect from the loading screen to an in-game view, or integrate NUI events with early-game spawn selection UI”, and that SEND_LOADING_SCREEN_MESSAGE becomes available at the same time. The older native SET_MANUAL_SHUTDOWN_LOADING_SCREEN_NUI is not supported; the client prints that you should use the manifest entry instead.
Something must make that call, and the frameworks handle it differently:
- Qbox:
qbx_corecallsShutdownLoadingScreen()andShutdownLoadingScreenNui()when it opens character selection. Its character script does not run whenuseExternalCharactersis enabled in its client config; the external character resource then has to make the call. The Qbox recipe setssetr loadscreen:externalShutdown trueso itsloadscreenwaits for that. - ESX Legacy:
esx_loadingscreenuses manual shutdown and closes itself through an NUI callback,loadingComplete, 2500 ms after loading ends (SHUTDOWN_DELAY).esx_multicharacteralso callsShutdownLoadingScreenNui(). - QBCore:
qb-multicharactercallsShutdownLoadingScreenNui(). - No framework: nothing calls it. Qbox’s
loadscreenhandles this case withloadscreen:externalShutdown false, its default: its own client script then callsShutdownLoadingScreen()andShutdownLoadingScreenNui()itself.
If you replace a framework’s screen with one that uses manual shutdown, the framework’s character resource closes it. If you run no framework, either leave the line out or add a client script that closes the screen.
Loading screens on FiveM for GTAV Enhanced
Cfx.re’s page “What’s Changed in FiveM for GTAV Enhanced” has no entry for loading screens, the loadscreen manifest entries or the loading screen events. One listed change can affect a loading screen: “All resources now have nui_callback_strict_mode enabled by default.” With strict mode, “only NUI belonging to the resource that registered a callback may invoke it.”
A loading screen that calls a callback registered by its own resource, as esx_loadingscreen does with loadingComplete, is not affected. A page that calls a callback in another resource is blocked on Enhanced with “HTTP 403 with status text The requested NUI callback was forbidden.”, and “nothing is printed to the console”. The docs’ fix is to move the shared logic into an export and register a proxy callback in your own resource, or to add nui_callback_strict_mode 'false' to the manifest. The fresh Enhanced Basic recipe contains no loading screen. The Enhanced server guide covers the other differences.
Troubleshooting
The default GTA loading screen still shows
Your resource is not running or its loadscreen path is wrong. Check the server console for errors when it starts; the Couldn’t start resource guide explains the common ones. Make sure the path in loadscreen matches the file exactly and that the file is also in files. The fxmanifest.lua guide covers the other manifest entries.
The old ESX, Qbox or QBCore loading screen still shows
Two resources declare loadscreen, and the client shows only one of them. Take the stock one out of its category folder or delete it, as described in the table at the top.
FiveM loading screen stuck after loading
The page uses loadscreen_manual_shutdown 'yes' and no script calls ShutdownLoadingScreenNui(). This happens when a framework’s loading screen runs on a server without that framework’s character resource, or when Qbox’s loadscreen:externalShutdown is true without qbx_core. A stock screen that is still running can also cause it: its loadscreen_manual_shutdown line counts even when your page is the one displayed. Set the convar to false, remove the manifest line or the leftover resource, or add a script that makes the call.
No music on the loading screen
Check that the audio file is listed in files and that its path in the page is right. Autoplay is allowed by the client, so check the file and its path first. On Qbox, a player may have muted the track earlier: the resource remembers each player’s volume when loadscreen:rememberVolume is on.
Mouse cursor not showing on the loading screen
Add loadscreen_cursor 'yes' to the manifest. Without it the screen still takes input, but the cursor is hidden.
The progress bar jumps from 0 to 100
loadProgress starts at 0 and ends at 1, and the values in between depend on the client’s load timings. For a bar that moves in smaller steps, use initFunctionInvoking and performMapLoadFunction as the official example does.
Inspecting the page with dev tools
The client console command nui_devtools “Opens the NUI dev tools window from the game process”. Use it to read JavaScript errors and failed requests in your page.
Next Steps
- Add more resources in the right order with the FiveM script installation guide.
- Learn every manifest entry your loading screen uses in the fxmanifest.lua guide.
- Rebuild a server from a recipe, with or without a framework, using the txAdmin recipe guide.
- Browse FiveCrate’s FiveM loading screen category or the full list of FiveM scripts.
FiveM scripts from FiveCrate
Listed in the FiveCrate catalogue now.
Official documentation and repository references
Related guides
FiveM Enhanced Server Setup: What Owners Must Know
How to set up a FiveM Enhanced server: get Cfx Server, run txAdmin, deploy the Enhanced recipe, and plan for escrow, stream_enhanced, voice and game builds.
Fix FiveM 'Couldn't Start Resource' and Dependency Errors
Couldn't start resource in FiveM means a start check failed. Read the line above it, then fix the dependency, manifest, server build or folder name.
fxmanifest.lua Explained for FiveM Server Owners
What each fxmanifest.lua line does in a FiveM resource: fx_version, game, scripts, files, data_file, dependencies, __resource.lua, lua54 and manifest errors.
How to Install FiveM Scripts and Resources Safely
How to install FiveM scripts: check the files, put the folder in resources, add its dependencies and SQL, then set the ensure order in server.cfg.
txAdmin Recipes Explained: Deploy Qbox, ESX or Default
How a txAdmin recipe builds a FiveM server: the current Popular Recipes list, each deployer step, database options, custom URLs and the QBCore deprecation.

