#Enum.KeyCode
25 messages · Page 1 of 1 (latest)
Enum.Keycode brings a list of all of the key codes and you can do Enum.Keycode.E
yeah but do i just put Enum.Keycode.E and then under it the code?
local Key = "E"
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode[Key] then
-- code here
end
end)
-- or
-- I suggest using the second one unless you want to be able to change the key that it uses
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E then
-- Code here
end
end)
hmm
yo bro
it aint working idk whats wrong
oh aight
still doesnt work lol
It shouls
** You are now Level 5! **
Is it a localscript
ye
** You are now Level 4! **
idk its weird