How do I make a door open when pressing E on a button?

You must watch this tutorial by Epic. It will answer your questing better than I ever could.

Currently working on a game where I need a button to be pressed so that a door can lift up and when the button is pressed again the door will lower, I’ve tried looking at line trace as I don’t want it to be a box trigger. I’m just unsure what to do exactly

I have two blueprints, the button and the door, I need to click on the button so that the door will open. Though this did help a little thank you!

when you say button do you mean a keyboard input or do you mean a item in the level?

as for line trace, are you working in 3rd person or 1st? if its a third person, the trace has to hit the door mesh, and your door lifts then you may run into issues of the trace not hitting the door to close it. if its a first person then you will need the trace to come from the camera out into the world the direction the camera faces (forward vector).

last why no box collision? itd be a simple task to create a door based on overlaps, unless theres many interactables in the same area. it wouldnt need to be automatic, you could just use the overlap to enable input to the door actor and to display a on screen message like “press e to open”.

You stated the problem I’m facing. I just tried the trigger box idea but seeing as the two trigger boxes are on one panel (one trigger on top of the other) they both do their functions at the same time. Is there a way around this?

no need for two trigger boxes. i can see from another of your comments that you are using two actors, one for the button and one for the door. if thats the case then you just need a collision volume around the button as thats what your character will interact with. then on begin overlap with the character you enable input to the button. from there you have a script which on button pressed calls a custom event in the door actor. the custom event in the door then handles moving the door.

below is a example. also note the variable DoorRef which is public and whos type is of the doors class. this enables you to select the button in the level and set which door it opens in the details panel.

also if you have a finite number of buttons per door then you could actually combine the actors into one and eliminate some of this.

Well instead of implementing the interface in the door like in the tutorial do it in the button and then call an event on the door by getting its reference.

Also you can use linetrace and make it shoot from the player camera manager if its an FPS game