How do I make a door open and close by pressing "E"

Great answer! I just have one question, how would you do this in multiplayer?