Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Tool, keystroke! Help, please! How to do it?lllllllllll

How can I make the instrument pick up when I press the E button (on the keyboard)?

2 comments

0

UserInputService

0

use InputBegan from UserInputService

2 answers

local UserInputService = game:GetService("UserInputService")
 

UserInputService.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode .E then
                --Here the behavior of the tool
	end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.