Learn
Engine Class
GetTextBoundsParams
Not Replicated

Summary
Inherited Members
Code Samples
Measuring Text Size
local TextService = game:GetService("TextService")
-- Declare parameters
local params = Instance.new("GetTextBoundsParams")
params.Text = "Hello world!"
params.Font = Font.new("rbxasset://fonts/families/GrenzeGotisch.json", Enum.FontWeight.Thin)
params.Size = 20
params.Width = 200
local success, bounds = pcall(function()
return TextService:GetTextBoundsAsync(params)
end)
if success then
print(bounds)
end

API Reference
Properties
Font
Read Parallel
Capabilities: UI
GetTextBoundsParams.Font:Font

RichText
Read Parallel
Capabilities: UI
GetTextBoundsParams.RichText:boolean

Size
Read Parallel
Capabilities: UI
GetTextBoundsParams.Size:number

Text
Read Parallel
Capabilities: UI
GetTextBoundsParams.Text:string

Width
Read Parallel
Capabilities: UI
GetTextBoundsParams.Width:number

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.