How to make a name that is too long for a text element shorter

Hiya, so I was wondering how do you make a name thats too long be shortened with …

For example: Hauber_RBLX turns into Hauber_RB…

Does anyone know how to do this? Thanks in advance

Substring.

local CHAR_LIMIT = 9
local str = "Hauber_RBLX"

str = str:sub(1, CHAR_LIMIT) .. "..."
--str = string.sub(str, 1, CHAR_LIMIT)
print(str)
2 Likes

Thank you! This is what I was looking for!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.