Aprenda
Classe do mecanismo
GetTextBoundsParams
Não replicado

*Este conteúdo é traduzido por IA (Beta) e pode conter erros. Para ver a página em inglês, clique aqui.


Resumo
Membros herdados
Amostras de código
Medindo o Tamanho do Texto
local TextService = game:GetService("TextService")
-- Declarar parâmetros
local params = Instance.new("GetTextBoundsParams")
params.Text = "Olá mundo!"
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

Referência API
Propriedades
Font
Ler Parallel
Recursos: UI
GetTextBoundsParams.Font:Font

RichText
Ler Parallel
Recursos: UI
GetTextBoundsParams.RichText:boolean

Size
Ler Parallel
Recursos: UI
GetTextBoundsParams.Size:number

Text
Ler Parallel
Recursos: UI
GetTextBoundsParams.Text:string

Width
Ler Parallel
Recursos: UI
GetTextBoundsParams.Width:number

©2026 Roblox Corporation, Roblox, o logotipo Roblox e Powering Imagination estão entre nossas marcas registradas e não registradas nos EUA e em outros países.