Avatar Image on HUD

I have come into a problem when putting a steam avatar image on a HUD that I am creating.
The image does work, it shows up on the HUD. My problem however is that it does not disappear when I press pause, bring up console etc. It also does not update when I change resolution. I know I have nothing updating it but I was wondering if anyone had a solution to my problem.

local Avatar

function HUDValidCheck()
	if !LocalPlayer():IsValid() then 
		if !Avatar then
			Avatar = vgui.Create( "AvatarImage", Panel )
			Avatar:SetSize( 64, 64 )
			Avatar:SetPos( 18, ScrH() - 165 )
			Avatar:SetPlayer( LocalPlayer(), 64 )


Any input would be appreciated.
Could Anyone reply to this with their explanation/advise or a link?

I really need help with this.

derma isn’t drawn in the hudpaint hook, you can try parenting the panel to the hud or drawing it manually in hudpaint

Okay sort of with you so far. Could you give me an example please?

Panel:ParentToHUD or

Panel:SetPaintedManually and


I am sorry to ask but could you create some code for an example. I am a bit of a noob :wink: