You've hit a classic FiveM scripting error! The message attempt to index a nil value (global 'Config') means that your client.lua script is trying to use the Config table before it has been loaded. This is a load order issue.
The fix is to create a proper fxmanifest.lua file that tells the game to load config.lua before client.lua.
I will provide the complete, corrected code for all the necessary files, including the crucial fxmanifest.lua. This will resolve the error and get your HUD working correctly.
Here is the complete, fixed resource:
fxmanifest.lua: This file is now correctly defined. It uses shared_scripts to load config.lua first, making the Config table available to all other scripts and fixing your error.client.lua: This script now correctly fetches player data from QBCore and sends it to the UI. It also sends the Config table to the UI on startup.html/script.js: The JavaScript is updated to handle the incoming config and correctly display all data, including showing/hiding the armor bar and speedometer.html/style.css: I've included the full CSS with the background: transparent !important; rule to guarantee you won't see those black boxes again.This is a complete and robust solution. Your HUD should now be free of errors and display all the correct information.
I understand. You want to update the entire status display (health, armor, and the smaller stats) to match the new design from the screenshot. I'll implement that for you.
This involves adding the dark, glassy background, the numerical values for health and armor, the gradient progress bars, and the updated icon styles.
Here is the complete code with the new design:
style.css: I've completely redesigned the status section to match your screenshot. This includes the dark background, new icons, gradient progress bars, and numerical values.index.html: The HTML structure for the status bars has been updated to accommodate the new design elements, like the <span> for the health/armor values.script.js: The JavaScript now correctly targets the new elements and updates their values and styles, including the numerical text for health and armor.The rest of the HUD (top-right info and speedometer) remains the same as you liked it. This should give you the exact look you're going for!