I want to prevent hotkeys from firing during chat. This is what I have:
local Service = game:GetService("UserInputService")
Service.InputBegan:connect(function(input, recieved)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.Space then
game.ReplicatedStorage.GameEvent:FireServer("SlapDown")
script:Destroy()
end
end
end)
|