This is what I tried:
1 | script.Parent.Changed:connect( function (i) |
2 | if i = = 'Text' then |
3 | script.Parent.Parent.TextLabel.Text(script.Parent [ i ] ) |
4 | end |
5 | end ) |
Can you elaborate? If you are trying to automatically update it whenever the text is changed that won't work. If what you want to do is update whenever they get out of the textbox you could do
1 | script.Parent.FocusLost:connect( function (enterPressed) |
2 | --This is called whenever you stop editing the text in a TextBox, either by pressing enter or clicking outside the box |
3 | --As an option you can check if the enter key was pressed when focus was lost |
4 |
5 | script.Parent.Parent.TextLabel.Text = script.Parent.Text |
6 | end ) |
Also since I didn't personally test the script I'm not 100% sure but I believe if you change line 3 to
1 | script.Parent.Parent.TextLabel.Text = script.Parent.Text |
Then it might work as well