Basically, I’ve been trying to get what the player is exactly typing for the past 15 minutes for a autocomplete system I’ve been working on and I’ve been trying to debug to see if I can get what the player is exactly typing in the chat.
-- Reference from #bug-support for the IsFocused
local IsFocused = function()
return game:GetService("TextChatService").ChatInputBarConfiguration.IsFocused
end
while task.wait() do
if IsFocused() then
print("Found")
if game:GetService("TextChatService").ChatInputBarConfiguration.TextBox then
print(game:GetService('TextChatService').ChatInputBarConfiguration.TextBox)
end
else
print("Not focused")
end
end
Sadly ChatInputBarConfiguration.Textbox doesn’t actually get the current text, it just sets what the game uses as the chat input box. If you want to get what the user was currently typing your best bet would probably being using your own custom chat or UserInputService:
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input, gpe)
if gpe == true then --GameProcessedEvent checks if input is already being used so we can use it to see if user is chatting. Not exactly reliable though.
print(input.KeyCode)
end
end)
Again if you want a good solution I’d recommend just trying to make your own custom chat