How to TextBox Text to TextLabel?

This may sound very dumb. But how do you do Textbox text to textlabel. I tried like 3 different ones but didnt work.

This category is intended for completed working code that you would like to improve. Consider #help-and-feedback:scripting-support next time and include your attempts to help provide context.

With the little context provided, I think you are wanting to change the text in a TextLabel each time the TextBox text changes, in which case you can use GetPropertyChangedSignal to fire when Text changes:

TextBox:GetPropertyChangedSignal( 'Text' ):Connect( function()
    TextLabel.Text = TextBox.Text
end )

If you just want to do it at another time, like when a button is clicked, you just need the line in the middle inside of whatever function you want to set the label text in.

1 Like

First of all, it is the wrong category

Second, can you please eleborate mre on what you want to achieve?

Thanks so much. Sorry for the small context , usually I write paragraphs but I don’t know what I was thinking this morning XD.

Yes I wanted as the TextBox changes for the text label to change. I tried a method where when the you write the text and click a button for the change which didn’t work as well. I don’t know if I use a local script or script.

Just going to ask if this gonna work if textbox is on a different frame as the textlabel. As I’m creating a self check in and the information to enter is on an admin panel for the host to enter the information for the flight and the flight information to display onto the booking flight information which are 2 different frames.

Sorry for the confusion

It should work, just bear in mind that GUIs and input is local, and therefore the text from the TextBox will only be seen on the computer that typed it, and the code I gave above will also need to be in a localscript on that machine.

If you want it to be shown to the whole server, you’ll need to send it to the server by a RemoteEvent, and you will need to use the text filtering API to filter the text to ensure any text that is not allowed has been removed.

1 Like