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.
Use the TextBox.Text
property:
print(textBox.Text)
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.