Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Making text box text print in the output?

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

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.

2 comments

0

didnt work

0

can i see your script?

This discussion is preserved as it was. New answers, comments, and votes are closed.