Hud not appearing

Dear readers,

I got this problem were my custom hud appears in Singleplay but not appearing in multiplayer?
I searched on Google and there are people with the same problem, but not a fix.



Bout showing your CODE!!! You cannot expect us to help you with a problem without even seeing the code…

With that much info provided, I doubt anyone can help you.

Does your hud actually get loaded? Test that by adding a ‘print(“Hud loaded!”)’ or something like that to your code.
Do any errors appear?
What does ‘not appearing’ mean? It’s invisible or it just doesn’t work at all?

I’m sure there were better ways of asking for a snippet.

As for the problem above, is it possible you aren’t telling the game to send the hud to the client?

AddCSLuaFile is the function you’ll want for that.

If it’s a workshop addon that you’ve subscribed to but haven’t listed on your server, then that would also cause this issue.

Workshop for Dedicated Servers is the page you’ll want to read on for that issue.

Sorry if I came off rude, but showing code would be useful if James xX’s fixes don’t work.

I can’t just send my custom made HUD with 300+ lines on Facepunch.

[editline]22nd September 2017[/editline]

Thanks for helping, but both did not work. I have a clean server so no addons or anything.

[editline]22nd September 2017[/editline]

Ive added the print(“Hud loaded!”) but did not show up in my console. But whenever i start my server it says that my Hud is loading. Adding filesystem Addon “path of my HUD”.
There are no errors.

My files are:

cl_hud.lua & cl_deathscreen.lua

Where is your file located, and where are you calling



I put the AddCSLuaFile on both top sides of the files.

cl_hud.lua = AddCSLuaFile( “cl_deathscreen.lua” )
cl_deathscreen.lua = AddCSLuaFile( “cl_hud.lua” )

You should put AddCSLuaFile in serverside files, but autorun files are automatically AddCSLuaFile’d internally. Your problem is that you aren’t putting the files in a lua folder; they should be “addons/[addon name]/lua/autorun/client/”.

Put it in a pastebin then link us the pastebin. Prevents spamming of the forums and helps everyone.

Did that, but still doesn’t work.

I am inclined to think you didn’t. Make sure your addon is structured properly, make sure your files are in the right place, make sure to AddCSLuaFile them in the correct place, make sure to AddCSLua the correct file (the path is relative to the Lua folder). Make sure the path of your files don’t conflict with anything else (that you’ve called them cl_hud and cl_deathscreen might be an issue, however prefixing them with a unique string such as your name should be ine).

Once you’ve done that, make sure the serverside file adding the clientside lua files is running, and is running soon enough to perform the task required.

Once you’ve done that, verify that the clientside files are executing.

If you still have more problems, add me on steam and I’ll go through it with you, but if it turns out you didn’t follow the information given in the thread I’ll be well annoyed at you.

Dear OP,

I can think of many solutions to a problem like yours but this free help falls flat with what little information you have reluctantly provided.
I’ve read the other posts in this thread and there seems to be some good answers, but no one can be sure if we’re on the right track to a fix.

If you haven’t yet taken up James’s generous offer to help you privately for free, i’d suggest trying what txike said because your stated file structure is incorrect.
If that doesn’t work please first show us that your code is even working at all in singleplayer (screenshot), along with telling us where you’ve put the files for your singleplayer compared to your server.

Thanks and good luck.

P.S. Your 300 lines

Is nothing special.

At all.