How do i detect if people press any key to string


I was making something and I want to make custom keybinds. I don’t know how to detect people press any key on their keyboard, I’ve been searching and found nothing useful that can help me. Please help me

Consider checking out

Particularly InputBegan

yeah I know that but I wan’t the way how to do it (not a script)

Create a BoolValue to detect whether or not the player is in Keybind Mode. When this mode is set to true, the game detects any input that the player puts out.

local UIS = game:GetService(“UserInputService”)
local KeybindMode = BoolValue

UIS.InputBegan:Connect(function(input, notinchat)
   if notinchat then
       if KeybindMode.Value then
           —receive input and set it as keybind
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.