Hello! Currently, I am working on a game and have a small issue that I don’t know how to fix. I am basically trying to create a custom proximity prompt system and currently I am trying to match the keycode you need to press for the custom prompt to activate to the base outline of a prompt that will be inside the item. This is my code:
local userin = game:GetService("UserInputService")
local currentitem = game.Workspace.Part
local proximitypromptactive = false
userin.InputBegan:Connect(function(key)
if currentitem ~= nil and proximitypromptactive == true then
if key.KeyCode == Enum.KeyCode[tostring(currentitem.ProximityPrompt.KeyboardKeyCode)]
print("triggered")
end
end
end)
I have no clue how to get the character E or Q or whatever into the KeyCode Enum version of it. Please help!