What I would like to do is so if I'm holding the "E" key down, it will allow me to print "hello" if I click. It doesn't work at all.
-- Variables
local plr = game:GetService("Players").LocalPlayer
local uis = game:GetService("UserInputService")
-- Main function
uis.InputBegan:Connect(function(input, gameProcessedEvent)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.E then
if input.UserInputType == Enum.UserInputType.MouseButton1 then
print("hello")
end
end
end
end)
