IsA isn't working

Making an invis script and the script doesn’t work past the :IsA() if statement:

game.ReplicatedStorage:WaitForChild("TurnInvis").OnServerEvent:Connect(function(character, invis)
	for _, part in pairs(character:GetDescendants()) do
		print(1)
		if part:IsA("BasePart") or part:IsA("Decal") then
			print(2)
		end
	end
end)

Ok so apparently it’s looping through the play and I don’t know why, the argument passed was a character model

Ok I forgot the player had to be passed so it thought the character was the player, I fixed it