I tested this and it seems to be a property to get plain text from rich text.
So, you’re saying that I must go through all my UI related scripts and change the name of everything that falls under a Text Object named Content…Seriously.
While it’s good a post was made to notify developers I can’t help but feel it should have been done a lot sooner, especially with something which very well could effect a LOT of games with a common word such as “Content”. When rolling out changes like this you should always give Developers TIME to change these things BEFORE you roll them out to avoid as much downtime for games as possible. This isn’t the first time this has happened and sadly I’m sure it wont be the last.
Please Roblox, ensure your Developers are given the appropriate time to react to these changes and make the necessary changes.
Well this will break some stuff for sure. If you want to quickly select all ‘Content’ items in your StarterGui that are under these text UI instances, here’s a quick snippet you can run in the command bar:
game:GetService("Selection"):Set({})
for _,v in ipairs(game.StarterGui:GetDescendants()) do
if (v:IsA("TextLabel") or v:IsA("TextButton") or v:IsA("TextBox")) then
local content = v:FindFirstChild("Content")
if (content) then
game:GetService("Selection"):Add({content})
end
end
end
I’m not one who usually likes to repeat what’s already been said, but this is just beyond frustrating. .Content
is just so vague yet so commonly used, there are so many better terms you could have called it that wouldn’t break a lot of things. TextContent
? RawContent
? This isn’t the first time. The next time something like this comes up, can your team look into other names as well? I truly think this headache could me adverted if a bit more time was spent thinking it though.
Just my 2¢ at least.
I’m starting to notice a trend of new properties being added that conflict with names that are often used by developers for children. This has happened with Pivot
, BodyAngularVelocity
(which was thankfully renamed to AssemblyAngularVelocity
) and now Content
. I think it’s time to start using FindFirstChild in place of the index operator when getting children, and I’ve already replaced code in the game I’m currently working on to only use FindFirstChild
for all children.
The name Content
also doesn’t really explain what the property is actually for. It could be confused with the Text
property.
In my opinion allowing developers to use the index operator to get children was a bad idea, but that ship has already sailed.
The problem with using ::FindFirstChild
versus normal indexing is there’s overhead with the former.
This already makes it a second-choice option for a lot of devs if we’re able to guarantee an objects existence beforehand.
Note replacing all uses of .Content does not guarantee you’re game will be fixed.
Referencing instances via
TextObject[“Content”]
will also break following this update.
So instead of giving us an advanced warning like you did here; you went and ahead and shipped it?
Sounds like there’s a process and it just wasn’t followed.
Not sure if this is the best place to ask but what is the content property used for. I’m on my phone do its hard to search on the dev hub if I could get any links or a quick explanation, Thanks.
This is getting repetitive and rather frequent in recent months.
I understand the frustration of this, this is one of the reasons I started using lowercase names for everything so if something gets added/renamed it doesn’t break stuff.
Roblox automatically adds camelCase
versions of all APIs, as far as I know. You may want to check that your solution actually works.
Unprofessional company since this type of situation occurs way too frequently where a breaking change is made with not enough beforehand mention. There needs to be adjustments in management if there’s ever going to be change.
Thanks for your feedback. We posted about this as we are concerned about whether there are functional breakage of games caused by this release. With respect of community opinions, we will revert this change in the next release and find a better property name with announcement in advance. Thanks.
Y’all really getting mad over updates. Like be happy were getting more updates for UI.
Your really getting mad over a update you can easily fix yourself in less than a 2 minute period.
No need to get pressed over this now.
The point is, it’s unnecessary breaking with no warning.
It’s not fun having to go and change things for any number of scripts several times over each time related update gets released.
That’s not why people are angry. Updates to the platform are important, but forewarning regarding updates to developers to ensure games don’t break as a result of them is equally if not more important. Adequate forewarning is all we ask for.
While this may be applicable to you and your circumstances, on larger scaled projects or for other scripters this may be far from true. What you’re describing is a best case scenario, which, given the extremely general nature of the name “Content” as it applies to this situation, is anything but best case.
Developers aren’t going to “be happy” over an out of the blue, unannounced update that’ll cause problems for their games just because it’s a new update for UI.
Your really getting mad over a update you can easily fix yourself in less than a 2 minute period.
No need to get pressed over this now.
Also, bigger games with more advanced UI will take far longer than 2 minutes to change if they used “Content” for a lot of their assets. Just because it’ll be quick for you, that doesn’t mean it won’t be inconvenient and time consuming for others.
Why not just name the property TextContent
?