The key pressing detection, works like in unity.
It gives you a bool, if the key or button,
is being pressed at the moment, it will return “true”.
How to get input?
Just call one of the functions, under this text.
local RunService = game:GetService("RunService")
local Input = require(script:WaitForChild("HotkeyModule"))
RunService.RenderStepped:Connect(function()
local IsKPressed = Input.getKey(Enum.Keycode.K)
local IsMouseButton1Pressed = Input.getButton(Enum.UserInputType.MouseButton1)
if IsKPressed then
print("K key has been pressed!")
end
if IsMouseButton1Pressed then
print("Left mouse button has been pressed!")
end
end)
Also please, propose me, what should i add or change.