An example would be the default chat system in-game, where pressing "/" automatically begins typing.
There is a method TextBox:CaptureFocus() to make a user start typing in that textbox.
(Thanks to einsteinK for saying about the Capture Focus method!)
You are talking about the wonderful UserInputService!
For an example of this,
local service = game:GetService("UserInputService") -- The service required to detect UserInput local gui = script.Parent --My gui service.InputBegan:connect(function(keyPressed,gameProcessedEvent) --Connect the function if gameProcessedEvent then return end if keyPressed.KeyCode == Enum.KeyCode.Slash then --If "/" then do... gui.TextBox:CaptureFocus() --To start typing. end end)
Hope I helped!
THIS MUST BE A LOCAL SCRIPT