Text+
DevForum Topic
  • Welcome
  • Installation
  • Fundamentals
    • Introduction
    • Line breaks
    • Customization
      • Fonts
      • Scale-size
        • Minimum- and maximum-size
      • Truncation
      • Dynamic
      • Custom defaults
    • Modification
    • Text bounds
    • Signals
      • Update
  • Fine-control
    • Introduction
    • Full iteration
  • Specific access
  • Transform and style
  • Custom fonts
    • Introduction
    • Data module
    • Font to XML
    • XML to Lua
    • Upload font image
    • Import font data
Powered by GitBook
On this page
  • Character (requires having no sorting)
  • Word (requires word sorting)
  • Line (requires line sorting)

Specific access

You can always access the exact line, word or character you want by indexing like this:

frame["1"]

With some sorting enabled, you'll be able to easily access and loop through specific lines and words.

Character (requires having no sorting)

local character = frame["1"] -- (Character-1)
-- For Roblox fonts, 'character' will be a TextLabel.
-- For custom fonts, 'character' will be an ImageLabel.

Word (requires word sorting)

local word = frame["1"] -- (Word-1) — Word sorting.
local word = frame["1"]["1"] -- (Line-1 -> Word-1) — Line and word sorting.
for characterNumber, character in word:GetChildren() do
	-- For Roblox fonts, 'character' will be a TextLabel.
	-- For custom fonts, 'character' will be an ImageLabel.
end

Line (requires line sorting)

local line = frame["1"] -- (Line-1)

-- Line and word sorting:
for wordNumber, word in line:GetChildren() do
	-- 'word' will be a folder.
	for characterNumber, character in word:GetChildren() do
		-- For Roblox fonts, 'character' will be a TextLabel.
		-- For custom fonts, 'character' will be an ImageLabel.
	end
end

-- Line sorting:
for characterNumber, character in line:GetChildren() do
	-- For Roblox fonts, 'character' will be a TextLabel.
	-- For custom fonts, 'character' will be an ImageLabel.
end
PreviousFull iterationNextTransform and style

Last updated 10 days ago