I set a general switch for the NPCs in a room and made a 2nd event page where it's empty. The first page for those npcs have the switches on.
Now I have it on my transfer (for when I leave the room) to turn the switches off but that doesn't seem to be working. After I talk to the NPCs they disappear and when I transfer out of the room they just come back.
What's an easier way for me to achieve this?
Attached are the screenshots
Your description of what happens is consistent with how you've got the events set up.
When you talk to the NPC, you turn on the switch. This then activates the second page with that switch as a condition so they disappear straight away. Then when you leave the room you turn the switch off again, so the first page becomes active and they reappear.
If you want them to disappear when you leave the room, make the transfer event turn the switch on. Don't turn it on in the events themselves.
And unless you want them to reappear in this room at some point, leave the switch on.
I don't understand what you are trying to achieve, but the behavior you are describing fits with the event pages you shown us.
-> The NPCs are there when the switch is OFF.
-> The NPCs disappear when the switch is ON.
-> When you talk to the NPC, it turns the switch ON, thus, making them disappear.
-> Exiting the room turns the switch OFF, thus, making the NPCs reappear when you re-enter the room.
Just turn on a switch on the "trigger" event, and have another (later) page on the affected event that's conditioned by that switch.
When determining which page to make active, the engine starts from the highest number and works its way back to the lowest number. As soon as it finds a page that either has no conditions, or where all conditions have been met, it makes that the active page. So generally things that you want the event to do early in the game will be on the lower-numbered pages, and things you want it to do later in the game will be on the higher-numbered pages, as their conditions will be met later in the game.