I am quite new to scripting, and found nothing on this online.
Connect a function to the event that is fired upon the button being clicked, which will set the text.
We'll use the following:
MouseButton1Click
event ofTextButton
. See in the docs
Text
property ofTextBox
. See in the docs
Like so:
-- Connect a function to the event, so that it will run every time the event fires YourButton.MouseButton1Click:Connect(function() YourTextBox.Text = "Whatever text you want here" -- Set the Text property, changing the text shown end)