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)