PC Info: Windows 11, 23H2 Date First Experienced: 1/28/2024 Date Last Experienced: 1/28/2024
Reproduction steps: 1. Open up roblox studio and create a local script. 2. Run something like the below code to create text with stroke, inside the built-in chat
local message = '<font face="Arcade" color="#181818"> <stroke color="#651B1D" joins="miter" thickness="2" transparency="0.25">' .. "Player %s has found the Prophecy of Mephisto scroll." .. '</stroke> </font>'
game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(message)
3. Wait for the chat, let it to go transparent. You will see that text stroke is still visible creating bad visuals
Here is a video showing the issue:
Expected behaviour: The stroke should become fully transparent with the text. Actual behaviour: The stroke is visible.
The problem seems to be rich text, it seems that tweening text transparency does not affect stroke transparency on rich text, would be glad if you guys can fix that.
yeahh i think RichText’s stroke feature still doesn’t get affected by the TextTransparency. I really hope they fix it but as a different solution i would recommend using UiStroke (don’t forget to make the transparencies the same when tweening or changing em)
This is still quite an issue, another bug I experienced is the following:
As you can see here, attempting to change TextStrokeColor3 in a PrefixTextProperties seems to do nothing, even though the option is there.
Hey! If anyone else is still having problems, I’ve released a faithful recreation of TextChatService that addresses this issue. OpenTextChatService - Open-Source Implementation of TextChatService. This is on top of a bunch of other bugs and performance issues with TextChatService that I’ve addressed. Unfortunately, the transparency property of chat message UIGradients aren’t supported as a consequence, but textstrokes do in fact tween out. Until Roblox addresses the issue on their end, consider checking it out!
bumping because this issue STILL exists. it’s super awesome that toxic remade the service to work how it should, but developers shouldn’t have to somehow stumble across their module to make this service work as it should.
the solution in their code is easing a UIGradient’s transparency
function module.Transparency:SmoothDamp(dt: number)
self.Current, self.Velocity = TweenService:SmoothDamp(self.Current, self.Target, self.Velocity, 0.15, 1000, dt)
self.Transparency = math.round(self.Current * 1000) / 1000
if self.Transparency ~= self.LastTransparency then
self.LastTransparency = self.Transparency
local numberSequence = NumberSequence.new(self.Transparency)
for i,v in pairs(self.Binds) do
if v.Gradient ~= nil then
v.Gradient.Transparency = numberSequence
v.Gradient.Enabled = self.Transparency ~= 0 or v.Gradient.Color ~= module.ColorSequenceWhite
end
if v.Properties ~= nil then
for i,p in pairs(v.Properties) do
v.Instance[p] = self.Transparency
end
end
end
self.TransparencyChangedBindable:Fire(self.Transparency)
end
end
RunService.Heartbeat:Connect(function(dt)
self:SmoothDamp(dt)
end)
this should be the solution if RichText properties/tags aren’t going to be modified by a text’s transparency.
Staffs, this already exists on regular text. It shouldn’t be too difficult to adapt it while many people having problem and confusion about rich text that they even find this post.
It is in your responsibility here
If you worry about effects on existing systems, adding a new property somehow or maybe making a new markup such as joins=“miter” that handles this behaviour, would be nice.
We are running into this issue in our game right now as well, would love a solution for this!
Even if that solution is just adding a UI stroke instance, similar to the way we can apply gradients.