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

How to print the contents of a TextBox?

Alright so.

I need to print the contents of a TextBox for example. The TextBox has the words "wow" in it, this word was typed in by a user. I would like a script that prints whatever the user types in.

1 comment

0

Please try not to request scripts with no actual attempt here, if you want to do that there are sources especially for that, or you can use the discord. But this is not a request site.

2 answers

THE GOAL What you want to do is that every time someone types something in a text-box it will print it out. What you want to do is use properties. TextBoxes use the "Text" property which is the current text in the box.

THE CODE

local TextBox = script.Parent --We want to insert the script unde the textbox.
print(TextBox.Text) --We grab the text from the textbox and print it accordingly.

CONCLUSION Properties are extremely useful for GUIs, Tools, Parts, and more. Properties can be manipulated using the period symbol or the "." such as script.Parent.Text. However, there are other ways periods can be used, such as getting children/parents, etc.

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