I want to figure out if there is a way so that you can test if a player is typing in chat but did not press enter yet. Any ideas?
I already found another question on this site but, that's from 3 years ago and it doesn't really work. Here it is
game:GetService('UserInputService').TextBoxFocused:connect(function(TextBox)
local succ = pcall(function() TextBox:GetFullName() end)
if not succ then print('User is typing.') end
end)
game:GetService('UserInputService').TextBoxFocusReleased:connect(function(TextBox)
local succ = pcall(function() TextBox:GetFullName() end)
if not succ then print('User quit typing.') end
end)
(Credit goes to M39a9am3R, I'm just wondering if someone can figure out to make this work, I have no idea how to possibly make this script work.)

4 comments
Okay, so I'm sure this works however, I'm struggling to find out where to place this into in the game? Also, whenever I put this in the game, "UserInputService" appears with an orange underline.
I’ve never experienced the description you’re giving about UserInputService having an orange underline
But I believe it should be a LocalScript inside ‘StarterPlayerScripts’, you may require Client-to-Server communication depending on what you’re attempting to make, therefore you might want to read up on RemoteEvents
Highly recommend you put in the variables too sir in case new scripters don't read errors or know about services. Also please check for any errors before posting solutions, Posting solutions with syntax errors isn't really helping sir, LINE 1 parameter 1 name is different to the name used in LINE 2, LINE 2 used = in a comparison statement where == should have been used.