Garry's Mod

Garry's Mod

Fay's Main Menu - Live Background, Welcome Message, Integrated Changelog
Motoess 1 Jul, 2024 @ 8:16am
The "NULL Entity" error at cl_mainmenu.lua:476
The reason for the "NULL Entity" error at cl_mainmenu.lua:476 is because the hook HUDShouldDraw is trying to target the player before the player has been initialized.

To fix this, add:

if !IsValid(LocalPlayer()) then return end

at the beginning of the hook. I would also recommend caching
LocalPlayer()
as a variable considering the fact that you are using it multiple times.