I am making a game and it uses text boxes, but I want to be able to edit the text boxes after pressing enter/clicking off the text box but I can't, I have looked at the API reference but nothing is mentioning this, please help!
✓ ANSWER ACCEPTED
How to edit text box after pressing enter?
1 answer
✓ Accepted answer
I've never attempted this before, but I can imagine some uses! After some quick thought, this should solve your predicament:
local TextBox = script.Parent
TextBox.FocusLost:Connect(function(EnterPressed)
if not (EnterPressed) then return end
---------------
TextBox:CaptureFocus()
end)
3 comments
0
When I press enter, the text resets but i can still type inside of the box and clicking outside of the text box and clicking on it resets the text.
0
That's due to the ClearTextOnFocus boolean. Toggle it off; if you're trying to make a multi-line TextBox, there is already a built-in option to enable that feature within the TextBox's properties.
0
Thanks!
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
go to your explorer starter gui then text box then text and change it
lemme try
didn't work
You'll want to use the Focused and FocusLost events to do this. https://developer.roblox.com/en-us/api-reference/event/TextBox/FocusLost and https://developer.roblox.com/en-us/api-reference/event/TextBox/Focused