How to calculate the visual size of a word within a bunch of words on a text label

Hello! I’m trying to highlight various words so i’d like to be able to calculate lets say how much space letters between 3 and 6 take in total on a text label.

Is this possible to accomplish?

I’m trying to go for an effect like this:
image

At the moment i rely on TextBounds but those break half of the time. I already wrap things manually between lines so line breaks wont be a problem.

2 Likes

https://developer.roblox.com/en-us/api-reference/function/TextService/GetTextSize

Issue is that returns the size for the entire string i just want the size of a specific section thats sized by roblox automatically.