Im trying to make a script that the textlabel will change to what ever is in the TextBox
I have a button which I want to change the text on click. It is in a local script
Do you have any ideas?
Im trying to make a script that the textlabel will change to what ever is in the TextBox
I have a button which I want to change the text on click. It is in a local script
Do you have any ideas?
If you want your TextLabel to display the text of your TextBox once a button is clicked, simply connect MouseButton1Click to the button, and then set the TextLabel's Text property to the TextBox's Text, like this:
button.MouseButton1Click:Connect(function()
label.Text = box.Text
end)
If you want it to change as you type in the TextBox, connect to GetPropertyChangedSignal("Text") of the TextBox
box:GetPropertyChangedSignal("Text"):Connect(function()
label.Text = box.Text
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Furthermore, if you wanted it on button press (i.e. enter) you could use User input service
Thank you so much!