Is text tracking adjustable? If so, how?

For the opening screen of my game I’d like to have the title’s text extend to the edges of its frame. I’d like to accomplish this through adjusting the tracking of the text (the width of the space between each letter). How would I go about doing this? Is it even possible?

What I have:

What I’m looking for:

Thank you.

You won’t be able to achieve this look with just a single TextLabel would you need 1 TextLabel per character. What you can do is have them all in a single frame with a UIListLayout and set the HorizontalFlex to “SpaceBetween” and you should get the result your looking for.

If you need a script to do the wording.

function StringToSingleCharacters(AttachTo: Instance, String: string, TextLabel: TextLabel?): {string}
	assert(AttachTo:IsA("GuiObject"), `Arg[1] is not of classtype "GuiObject"`)
	assert(typeof(String) == "string", `Arg[2] is not type expected type "string"`)
	
	local StringToTable = string.split(String, "") -- Split the string into a table so we can loop through it
	
	for Index: number, Character: string in StringToTable do
		local CloneTextLabel = if TextLabel then TextLabel:Clone() else Instance.new("TextLabel") -- If you do pass through a TextLabel it will clone it else it'll just make a new one
		local IsCloned = TextLabel ~= nil or false
		
		CloneTextLabel.Name = `{Index}_{Character}`
		CloneTextLabel.LayoutOrder = Index
		CloneTextLabel.Text = Character
		
		if not IsCloned then
			CloneTextLabel.BackgroundTransparency = 1
			CloneTextLabel.Size = UDim2.fromOffset(30, 30)
		end
		
		CloneTextLabel.Parent = AttachTo
	end
	
	return StringToTable
end

StringToSingleCharacters(game.StarterGui.Main.Frame, "The Warehouse")
2 Likes

I’d use TextPlus for this.

2 Likes

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