So I'm currently scripting a custom NPC chat that utilizes a GUI in StarterGui. Basically, if you click the NPC you should be able to make that Frame in StarterGui visible, and it activates all of the text boxes inside of it. I got that part working. However, I can't figure out how to make the text change in the same script. Did I incorrectly script it? This is the script I managed to make:
local function click(player) player.PlayerGui.ScreenGui.Frame.Visible = true player.PlayerGui.ScreenGui.Frame.Name.Text = "Help-Bot" player.PlayerGui.ScreenGui.Frame.Description.Text = "Hi! I am here to help you!" end script.Parent.ClickDetector.MouseClick:connect(click)
"Name" is the title of one TextBox, while "Description" is a title of another.