I am trying to make a door that when the E key is pressed the door swings open but I have never scripted before and am clueless. Also if possible how to I make it so you need a keycard in your backpack to do so?
Look for tutorials on youtube, or if you have not scripted at all start with the very basics of scripting tutorials and work your way up. This site is for specific questions about scripts your currently writing, not for people to tell you how to write scripts in the first place