attempt to index global 'surface' (a nil value)

I can’t figure out why this is happening… last night it was working fine but this morning it wont seem to work

Post the line where the error is happening, also make sure your script is in lua/autorun/client.

I was unaware anyone at facepunch was a mind reader

Post the code

surface.CreateFont( “DefaultBold”, 15, 700, true, false, “boldt” )
surface.CreateFont( “HUDNumber5”, 30, 700, true, false, “boldheader” )
surface.CreateFont( “HUDNumber5”, 20, 700, true, false, “boldheader2” )
surface.CreateFont( “HUDNumber5”, 30, 700, true, false, “boldnames” )

those lines

Where did you put this script?

lua/autorun/client

Post the whole code, because something else is causing the error. Also, are there any other scripts that are being loaded?

clientside