Anti-Phys for Doors

PhysBlocked = {
			"func_breakable_surf",
			"func_brush",
			"func_door",
			"prop_door_rotating"}

function PhysPick( ply, ent )
	for k,v in pairs(PhysBlocked) do
		if ent:GetClass() == k then
			return false
		end
	end
	if ent:GetClass() == "player" then
		return false
	else
		return true 
	end
end

hook.Add("PhysgunPickup", "CantTouch", PhysPick)

Why can I still touch doors? Hope you can help <3 thanks.

On line 8:
[lua]if ent:GetClass() == k then[/lua]

should be

[lua]if ent:GetClass() == v then[/lua]

An even better way to do it:
[lua]local PhysBlocked = {
“func_breakable_surf”,
“func_brush”,
“func_door”,
“prop_door_rotating”
}

function PhysPick( ply, ent )
if table.HasValue(PhysBlocked, ent:GetClass()) or ent:IsPlayer() then
return false
end
end

hook.Add(“PhysgunPickup”, “CantTouch”, PhysPick)[/lua]

I Did some debugging, and I got it to where everytime I touch an Ent it tells me the entities class etc…

and its in my blocked list.

EDIT: Okay thanks