Hello guys, I have simple script that when the "F" button is pressed a GUI appears. However, my only problem with is this is that when in-game and using a word that contains the letter it appears. How would I efficiently make it so that it only appears when you aren't typing in the chat?
Here is the script for reference.
local Frame = script.Parent
function onKeyPress(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.F then
Frame.Visible = true
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)

1 comment
Thank you very much, i usually write scripts and have a break and completely forget about things..