Few people have "Lua Panic, Not Enough Memory (as shown below in the attached image)" issue when they try to join any server or when they crash mid-game.
In this list, you might find a fix for this error and if the following doesn’t work, let us know so that we can assist you further in trying to fix the issue.
SOLUTION/FIX
Step 1: Open steam and head to your games Library.
Step 2: Right-click on Garry’s Mod and select the option at the bottom of the list called Properties.
Step 3: Under the first tab (General) click the option at the bottom called Set Launch Options.
Step 4: Type in whatever corresponds to your current RAM below:
IF you have 2GB of RAM, enter this exact code into the launch options box:
-heapsize 2097152
IF you have 4GB of RAM, enter this exact code into the launch options box:
-heapsize 4194304
IF you have 8GB of RAM, enter this exact code into the launch options box:
-heapsize 8388608
Step 5: Click Ok and launch the game. Join the server and the problem should be fixed!
EXTRA NOTES
NOTE #1: If you have any amount of RAM which is NOT listed above, enter the closest amount below your RAM:
eg. If you have 6GB of RAM, enter the 4GB code OR If you have 16GB of RAM, enter the 8GB code.
NOTE #2: If you already have a launch option in the box, make sure there is a space in between the current code and the new code.
eg. If you currently have -windowed , set out the box as follows: -windowed -heapsize 4194304
In this list, you might find a fix for this error and if the following doesn’t work, let us know so that we can assist you further in trying to fix the issue.
SOLUTION/FIX
Step 1: Open steam and head to your games Library.
Step 2: Right-click on Garry’s Mod and select the option at the bottom of the list called Properties.
Step 3: Under the first tab (General) click the option at the bottom called Set Launch Options.
Step 4: Type in whatever corresponds to your current RAM below:
IF you have 2GB of RAM, enter this exact code into the launch options box:
-heapsize 2097152
IF you have 4GB of RAM, enter this exact code into the launch options box:
-heapsize 4194304
IF you have 8GB of RAM, enter this exact code into the launch options box:
-heapsize 8388608
Step 5: Click Ok and launch the game. Join the server and the problem should be fixed!
EXTRA NOTES
NOTE #1: If you have any amount of RAM which is NOT listed above, enter the closest amount below your RAM:
eg. If you have 6GB of RAM, enter the 4GB code OR If you have 16GB of RAM, enter the 8GB code.
NOTE #2: If you already have a launch option in the box, make sure there is a space in between the current code and the new code.
eg. If you currently have -windowed , set out the box as follows: -windowed -heapsize 4194304