How can i change a textbutton/textlabel's text in game?

Hello people,

so yeah i’m asking about how to change the gui’s text inside the game and not in studio

Try using the developer console.

not like that, i want it so that when you click it, you can type things and if you press enter the text will change.

use a click detector and prompt up the textbox gui and allow for whatever the character says inside the textbox to be replicated to the part.

1 Like

You might want to move this post to #help-and-feedback:scripting-support before it gets flagged.

The way you would change text of a text label is to do something like this.

local TEXT_INFO = "Hello World!"
TextLabel.Text = TEXT_INFO -- Should be a string surrounded by quotes

You can use an event with either MouseObject UserInputService ContextActionService or just a regular GUI Button to get player input when a player clicks. It is up to you to know which one to use.

This topic should probably go in #help-and-feedback:scripting-support. You’re looking for TextBoxes, which are used to get text input from the player:

https://developer.roblox.com/api-reference/class/TextBox

4 Likes

that’s what i’m looking for! ty.