I’ve been searching for videos about this. Since I can’t find a decent one, can anyone tell me the script? Thanks:)
Well, there are videos out there for this specific process. Maybe a little bit more research would help. Try this link about UserInputService: UIS. You would use this service to detect user input, from there you would determine if the KeyCode pressed was “E”. After determining it was “E” you can then proceed to open the door.
Edit: You should also probably look into using Magnitude to determine the players distance from the door. Here is a link for this: Magnitude
We’re only allowed to tell you the how, we’re not obligated to give you a whole script. Please read the rules for Scripting Support; asking for a script is forbidden.
As @Nitro989 pointed out, use UserInputService or ContextActionService. What you’re wanting to do is more than likely going to involve client to server communication, so you’ll also need RemoteEvents. If the game is just client based, you won’t need to use RemoteEvents and can probably use BindableEvents.