Part being touched even though script tells it not to

I have this script to make it so that a player can’t touch the boards I have. However, I get the error:

Touched is not a valid member of Model “Workspace.MapVoting.Board3”.

Here is my code:

for i, Pad in pairs(game.Workspace.MapVoting:GetChildren()) do
	if Pad.Name ~= "Board1" or Pad.Name ~= "Board2" or Pad.Name ~= "Board3" then
		Pad.Touched:Connect(function(hit)
			--Do stuff
		end)
	end
end

On line 2 it should be;

if Pad.Name ~= "Board1" and Pad.Name ~= "Board2" and Pad.Name ~= "Board3" then

Instead, as “Board2” for example, isn’t called “Board1”, so it will fulfill the requirements of the if statement. By replacing or with and, “Board2” will need to fulfill all the requirements of the if statement, to pass as a non-Board item.

One way you could improve this code even further, is by having all the blacklisted names in a table, and using if not table.find(), to identify a board. This way, you will quickly be able to add Board names to the list, if you add any to the game.

local Boards = {"Board1","Board2","Board3"}

for i, Pad in pairs(game.Workspace.MapVoting:GetChildren()) do
	if not table.find(Boards, Pad.name) then
		Pad.Touched:Connect(function(hit)
			--Do stuff
		end)
	end
end

is for a part not a model
maybe try
model.Part.Touched