cam.Start3D2D keeps moving randomily



AddCSLuaFile("proconfig.lua")
include("shared.lua")

function ENT:Draw()
  self:DrawModel()
  
  local amount = self:GetNWInt("Armor")
  
  local Pos = self:GetPos()
  local Ang = self:GetAngles()
  txt202 = ( ArmorText .. " = " .. amount )
  txt3 = ( ArmorText .. " = " .. amount )
  txt4 = ( " QuickKev Pro " )
  
  local TextWidth202 = surface.GetTextSize(txt202)
  local TextWidth3 = surface.GetTextSize(txt3)
  local TextWidth4 = surface.GetTextSize(txt4)  
  Ang:RotateAroundAxis(Ang:Up(), 90)

  cam.Start3D2D(Pos + Ang:Up() * 6, Ang, 0.11)
	draw.WordBox(1, -TextWidth202*0.5 -38, 20, txt202, "HUDNumber5", Color(0, 0, 0, 255), Color(0,0,0,245))
	draw.WordBox(1, -TextWidth202*0.5 -38, -10, txt202, "HUDNumber5", Color(0, 0, 0, 255), Color(0,0,0,255))
	draw.WordBox(1, -TextWidth202*0.5 -38, -40, txt202, "HUDNumber5", Color(0, 0, 0, 255), Color(0,0,0,255))
	draw.WordBox(1, -TextWidth202*0.5 -38, -70, txt202, "HUDNumber5", Color(0, 0, 0, 255), Color(0,0,0,255)) // i know i should have used surface.DrawRect, and i'm changing that in the ent right now, but the text below still moves like in the video.
	draw.WordBox(1, -TextWidth202*0.5 -38, -100, txt202, "HUDNumber5", Color(0, 0, 0, 255), Color(0,0,0,255))
	draw.WordBox(1, -TextWidth202*0.5 -38, -130, txt202, "HUDNumber5", Color(0, 0, 0, 255), Color(0,0,0,255))
	draw.WordBox(1, -TextWidth202*0.5 -38, -140, txt202, "HUDNumber5", Color(0, 0, 0, 255), Color(0,0,0,255))
  cam.End3D2D()
  
  cam.Start3D2D(Pos + Ang:Up() * 6.2, Ang, 0.11)
	draw.WordBox(1, -TextWidth3*0.5 -38, -120, txt3, "ConsoleText", Color(0, 0, 0, 255), Color(255,255,255,245))
	draw.WordBox(1, -TextWidth4*0.3 -10, -138, txt4, "ConsoleText", Color(0, 0, 0, 255), Color(255,255,255,245))
  cam.End3D2D()
end

function ENT:Think()
end


Here is a video explaining it:

Why is this happening and how can i fix it?

Because you are calling surface.GetTextSize without setting the font first, so it uses the last font used which changes when you show the weapon selection.

Oh shit i’m dumb. Thanks for the help.