local UserInputService = game:GetService("UserInputService")
local function onInputBegan(input,gameProcessed)
	if input.UserInputType == Enum.UserInputType.Keyboard then
	local keyPressed = input.KeyCode
	script.Parent.Value.Value = input.KeyCode
	print("a")
	print(input.KeyCode)
	end
end

UserInputService.InputBegan:connect(onInputBegan)

and the output is

01:21:01.744 - Players.Kwok6140.PlayerGui.Console.Script:5: bad argument #3 to 'Value' (string expected, got EnumItem)

4 comments

0

You could try tostring(input.KeyCode), but idk if that'll work.

0

Ok

0

Not working but Thank

0

You can't place a KeyCode value in a string value