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

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

Asked by 6 years ago

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

0
UserInputService piRadians 297 — 6y
0
use InputBegan from UserInputService User#23365 30 — 6y

Closed as Not Constructive by green271, User#23365, User#21908, and User#19524

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
1
Answered by
brok4d 77
6 years ago
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)
Ad
Log in to vote
0
Answered by
Mr_Unlucky 1085 Moderation Voter
6 years ago