As of a few days ago I noticed some of the TextBox’s in my GUIs displaying their preset text as “TextBox” rather than the text I had set. They hadn’t been changed for weeks and I know this started sometime between Saturday (2nd July 2016) and Tuesday (5th July 2016) inclusively.
This seems to be an issue with using a dictionary to create the TextBox, as can be seen from the following examples:
Keep in mind that using tables like you’re doing means that the keys could be set in an arbitrary order. Any one of those properties could be resetting another property’s value.
You should try something like this:
local function Create(instType, propArray)
local inst = Instance.new(instType)
for i = 1, #propArray do
local propInfo = propArray[i]
inst[propInfo.Property] = propInfo.Value
end
end
That way, you can define properties in order, like so:
local TextBox = Create("TextBox", {
{Property = "Name", Value = "Hello!"},
{Property = "Text", Value = "Huh, this is some text!"}
})
While I’m not sure what property specifically is causing your issue, setting the properties in order should help mitigate the issue.
That wasn’t the point I was trying to make (the first set of example code I posted already fixes the issue).
The point is that none of the properties should override Text, never-mind changing the text to “TextBox”, no matter what order they’re in. What you posted is effectively the same as just setting the properties normally (example 1).