How would I do this but with a lowercase e?

I simply want this to work when I press a lowercase e instead of if I press an uppercase E.

Local Script:


UserInput = game:GetService("UserInputService")

UserInput.InputBegan:Connect(function(input, isTyping)
	if input.UserInputType == Enum.UserInputType.Keyboard then
		local Mouse = game:GetService('Players').LocalPlayer:GetMouse()
		if input.KeyCode == Enum.KeyCode.E then
			game.ReplicatedStorage.RemoteEvent:FireServer(Mouse.Target)
		end
	end
end)

Server Script:


game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player, target)
	target:Destroy()
end)
1 Like

This doesn’t make sense. The code won’t not execute if you have caps lock enabled or not. It will always work if you press e.

3 Likes