HUD not updating score?

Hey guys so im working on a simple hud, I have made a chat command to check the scores but the scores wont update on the hud.


function DerkHUD()
	local ply = LocalPlayer()
	local HP = ply:Health()
	local Armor = ply:Armor()
	
	if ply:Team() == 1 then 
	
		local HP = ply:Health()
		local Armor = ply:Armor()

		draw.RoundedBox(4, 130, ScrH() - 100, 200, 30, Color( 40,40,40,120))
		draw.RoundedBox(4, 130, ScrH() - 100, math.Clamp( HP, 0, 200)*2, 30, Color( 255,51,51,255))
		draw.RoundedBox(4, 130, ScrH() - 100, math.Clamp( HP, 0, 200)*2, 10, Color( 255,255,255,40))
		draw.DrawText("Blue points: " .. teams[1].points, "Trebuchet24","100", ScrH() - 170, Color(0,0,255,255), 0)
		draw.DrawText("Red points: " .. teams[0].points , "Trebuchet24","100", ScrH() - 150, Color(255,0,0,255), 0)

	elseif ply:Team() == 0 then
		draw.RoundedBox(4, 130, ScrH() - 100, 200, 30, Color( 40,40,40,120))
		draw.RoundedBox(4, 130, ScrH() - 100, math.Clamp( HP, 0, 200)*2, 30, Color( 93,65,235,255))
		draw.RoundedBox(4, 130, ScrH() - 100, math.Clamp( HP, 0, 200)*2, 10, Color( 255,255,255,40))
		draw.DrawText("Blue points: " .. teams[1].points, "Trebuchet24","100", ScrH() - 170, Color(0,0,255,255), 0)
		draw.DrawText("Red points: " .. teams[0].points , "Trebuchet24","100", ScrH() - 150, Color(255,0,0,255), 0)
	end 
end

Any suggestions, Ive tried google countless times and i cant find anything.

Edit: Im using a table for teams, Dont ask why. Here are my teams anyways:


teams = {}

teams[0] = {name = "Blue", playercolorz = {Vector(.2, .2, 1.0)}, weapons = {"weapon_pistol"}, playermodel = {"models/player/kleiner.mdl"}, spawnpoint = Vector(702.911560, -177.432617, 61.586304), points = 0}
teams[1] = {name = "Red", playercolorz = {Vector(1.0, .2, .2)}, weapons = {"weapon_pistol"}, playermodel = {"models/player/kleiner.mdl"}, spawnpoint = Vector(1552.912231, -144.970062, 85.309647), points = 0}
teams[2] = {name = "Waiting", playercolorz = {Vector(1.0, 1.0, 1.0)}, weapons = {"weapon_crowbar"}, playermodel = {"models/player/kleiner.mdl"}}



Show us more code. Where is ‘teams’ defined?

Updated.