I am trying to make the script open a door when I press E, but I can't get it to actually open. My script doesn't have errors as far as I know. I also don't know about scripting at all so I may be doing this ENTIRELY wrong. Here is my script;
local UserInputService = game:GetService("UserInputService")
local motor = game.Workspace.main.Motor
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if input.UserInputType == Enum.UserInputType.Keyboard then
local keyPressed = input.KeyCode
if keyPressed == Enum.KeyCode.E then
motor.DesiredAngle = 1
end
end
end)
Lot of it was kinda salvaged from the wiki, but it doesn't work. I just need to know what I'm doing wrong, since Roblox won't tell me.
