works on another gamemod.

hey guys, i got an HUD that works on DarkRP, but didn’t work on mine.
I am getting this error:

[ERROR] gamemodes/***/gamemode/modules/cl_hud.lua:5: attempt to index global 'surface' (a nil value)
  1. unknown - gamemodes/***/gamemode/modules/cl_hud.lua:5
   2. include - [C]:-1
    3. unknown - gamemodes/***/gamemode/init.lua:13

on this part of code:

surface.CreateFont( "namef", {
 font = "Bebas Neue",
 size = 24,
 weight = 500,
 blursize = 0,
 scanlines = 0,
 antialias = true
} )

You’re including cl_hud.lua from init.lua.

It runs serverside

3. unknown - gamemodes/***/gamemode/init.lua:13

surface functions is clientside

Yeah ur right, just took it off,
but for some reason, my HUD doesn’t load, any idea why?