the enter key works but i cant seem to get the script to detect if the textbox is focused or not. tysm!
script:
local uis = game:GetService("UserInputService")
uis.InputBegan:Connect(function(inp, chat)
if chat then return end
if game.StarterGui.TextBox:IsFocused() and inp.KeyCode == Enum.KeyCode.Return then
print("enter was pressed and the text box is focused")
end
end)