local BombPlaceEvent = ReplicatedStorage:WaitForChild("BombPlaceEvent")
local UserInputService = game:GetService("UserInputService")
local ActionKey = Enum.KeyCode.E
UserInputService.InputBegan:connect(function(input)
if input.KeyCode == ActionKey then
BombPlaceEvent:FireServer()
end
end
UserInputType only tells you if it’s a mouse click or a gamepad button or a keyboard key:
https://developer.roblox.com/en-us/api-reference/event/UserInputService/InputBegan
Making it KeyCode detects key pressed