So my question is this: How can I get the "key" from a KeyCode value?
Example of what I have:
game:GetService("UserInputService").InputBegan:Connect(function(input)
workspace.Key.Value =tostring(input.KeyCode);
end);
print(workspace.Key.Value)
Currently if the key I press for example is "E" it will print "Enum.KeyCode.E". I want it to just print "E" instead.
I will also want to use this value to check for the button entered later with somthing like this:
local Key ="Enum.KeyCode."..workspace.Key.Value"
if(input.KeyCode ==Key)then
print("Pressed key!")
end
(I assume the above code would work, haven't tested it.)

2 comments
instead of reversing the string you could use -1 as the beginning of the substring
That works greatly too, capturing the last character of the string. It would only work in case your keycode is only 1 character though!