Need help with freezing specific entities with the physgun

In a gamemode I am trying to allow the freezing of certain props but not allow the freezing of others. I attempted to use the hook OnPhysgunFreeze but it isnt working. Here is my code I used below:


hook.Add( "OnPhysgunFreeze", "PhysFreeze", function( weapon, phys, ent, ply )
	if ent:GetClass() == "entity1" then
		print("entity1")
		return true
	elseif ent:GetClass() == "entity2" then
		print("entity2")
		return false
	else
		print("No Special Ent")
		return true
	end
end)

But even when I am returning true / false, everything on the map can not be freezed now. It seems no matter what I return, props can’t be frozen now. Can someone possibly see what I am doing wrong and how I can correct this issue? Or is there code I should be putting in the actual entity’s file to block/allow freezing? Thanks for all the help in advanced.

Edit:
Found what I needed in the sandbox entity’s coding. I guess I needed “self:SetUnFreezable(true)”