Gaining weight does affect the visibility of your abs, as excess fat can obscure them. However, remember that it's possible to gain weight and still maintain your abs, provided you're following a proper diet and workout plan. Focus on maintaining a calorie surplus for muscle growth while incorporating regular ab exercises into your routine.