Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Any help with a keyboard input sequence?

Asked by 6 years ago

Hello. Yesterday I learnt of keyboard inputs. But the problem is I still don't know how to make a keyboard input sequence door, any help can be helpful (correction, roblox lua wiki links) ^^ If you don't know keyboard inputs, here is an example

function onKeyPress(inputObject, gameProcessedEvent)
    if inputObject.KeyCode == Enum.KeyCode.S then
        game.Workspace.ForestWorld.TreePuzzle1.DownArrow.Transparency = 0

    end
end

game:GetService("UserInputService").InputBegan:connect(onKeyPress)
0
Here TheShiningSavior 10 — 6y
0
function onKeyPress(Input) if Input.UserInputType == Enum.UserInputType.Keyboard then if Input.KeyCode == Enum.KeyCode.S then print('pressed') -- do code here end end end game:GetService("UserInputService").InputBegan:connect(onKeyPress) TheShiningSavior 10 — 6y

Answer this question