'Transferring' text from a TextBox to a TextLabel

Hello there, in this topic, I will be showing and teaching you how to sort of transfer text from a TextBox to a TextLabel. Let’s begin:

First, you want to insert a ScreenGui into StarterGui.
Screenshot (20)
Then, inside of that ScreenGui, insert both a TextLabel and a TextBox.
Screenshot (24)


Then inside of the TextBox, insert a local script.
Screenshot (26)
Now we code!!

script.Parent:GetPropertyChangedSignal("Text"):Connect(function(property)  -- Not necessary, but defining it.

Now we find the TextLabel and match the text to each other

  script.Parent.Parent:FindFirstChild("TextLabel").Text = script.Parent.Text
end)

There you have it! It should now work!

robloxapp-20200506-1039341.wmv (255.4 KB)

If you found it helpful, or if there is a more efficient way of doing this, please say!

EDIT: Huuuuuuggggggeeeeeee shoutout to @MrLonely1221 as he has been so helpful to give me advice to use :GetPropertyChangedSignal(), thanks!

2 Likes
  1. You shouldn’t use wait() as it isn’t reliable 100% of the time and could read this post for a more in-depth reason as to why.
  2. Instead of having a while loop, why not just hook onto the :GetPropertyChangedSignal() of the TextBox and grab the “Text” property and each time that gets changed change the TextLabel

Other than that it’s a great tutorial! You should probably have a finished code section at the bottom so people know what it’s supposed to look like as it’s a little spread out.

2 Likes

Thanks!

I didn’t know that it wasn’t that reliable, but thanks!

Ill include the finished code!

If you’re not using property, why not remove it altogether?
script.Parent:GetPropertyChangedSignal("Text"):Connect(function()

Unfortunately this is not substantial enough for the Resources category. Basic usage of GetPropertyChangedSignal is not enough content to warrant an entire tutorial topic.