What I am trying to do is to make a class selection GUI for a game that has the scripts pull information of different value types rather than having to edit multiple scripts for convenience. So I have my GUI with a Frame holding all this information for one class type at the moment. With the current task of trying to get a TextButton to change it's name based on a StringValue also stored within the Frame.
textBody = script.Parent.Text -- referencing a TextButton's content function getName() local findName = script.Parent.Parent.Title.Value -- a class type of StringValue within the overall Frame return findName end print("getName() is "..getName()) -- returns name perfectly fine in the output window textBody = getName()
In the end I am able to retrieve the Value of the StringValue, however the TexButton's Text does not change. Is there a better method to this or is this just not possible to do in Roblox?
Oops. Found the solution lol. I needed a wait() before setting the name on textBody.