I'm wondering how I would make it so that when a player types in the text box it prints what they typed in the developer console/ output. I'm not asking for scripts or anything, I'm just asking for guidance. Thanks
✓ ANSWER ACCEPTED
Making text box text print in the output?
2 answers
✓ Accepted answer
There's an event of textbox called FocusLost:
You could add a local script inside of the textbox like so..
local textbox = script.Parent
textbox.FocusLost:Connect(function(bool)
if not bool then return end
print(textbox.Text)
end)
The boolean value represents whether they pressed enter or not, the script is setup to exit the function if the textbox was left in any method other than by the enter key (i.e. clicking outside of the textbox)
Its pretty easy just do:
local output = textbox.text
print(output)
But thats assuming you made a value called textbox.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
didnt work
can i see your script?