How to Disable inputs when in chat in roblox studio?

So I did some research and found out to use the gameProcessedEvent parameter, but I don’t know how to use it. So I want to make a keybind do something but I don’t want that it can be activated when you are typing in the chat. Anyone can help me please?

2 Likes

You literally just check if gameProcessedEvent is false when UserInputService.InputBegan() is fired. :slight_smile:

5 Likes

You would do something like this:

game:GetService("UserInputService").InputBegan:Connect(function(Input, GPE)
	if not GPE then
		-- Do things.
	end
end)
2 Likes

To add onto what’s already been sai

UserInputService.InputBegan:Connect(function(inputObject, gpe)
    if gpe then return end
    -- guard clauses are nice
end)
2 Likes