Inputs from number pad

Is there any possibility for roblox to detect any inputs from the number pad or it can not do that?

If so, can you provide a script for this?

It is named Keypad in Enum.Keycode (https://create.roblox.com/docs/reference/engine/enums/KeyCode#:~:text=Deprecated-,KeypadZero,-256)
You can detect it via UserInputService (https://create.roblox.com/docs/reference/engine/classes/UserInputService) or ContextActionService (https://create.roblox.com/docs/reference/engine/classes/ContextActionService).

Example for UserInputService:

local UserInputService = game:GetService("UserInputService")

local function OnInputBegan(input, gameProcessedEvent)
    if input.KeyCode == Enum.Keycode.KeypadZero then
        print("Numpad 0 pressed")
    end
end

UserInputService.InputBegan:Connect(OnInputBegan)

don’t forget about gameProcessedEvent if you don’t need to handle input while game already had processed event, for example while chatted.

Thank you lad, have a nice day

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