CreateMaterial not working




local params = {
	["$basetexture"] = "gulch/lava",
	["$nodecal"] = 1,
	["$model"] = 1,
	["$additive"] = 1,
	["$nocull"] = 1,
	Proxies = {
		TextureScroll = {
			texturescrollvar = "$basetexturetransform",
			texturescrollrate = 33.3,
			texturescrollangle = 60,
		}
	}
}
local new_material = CreateMaterial("mymaterial","UnlitGeneric",params);




print(new_material)

hook.Add("HUDPaint","DrawLava",function()
    surface.SetMaterial(new_material)
    surface.DrawRect(0,0,500,500)
end)



I copy pasted from the wiki and replaced my own texture :V, Yeah. I have no experience with this function, but all I know is nothing is working, this draws a strange texture :stuck_out_tongue: