Pelajari
Kelas Engine
GetTextBoundsParams
Tidak Direplikasi

*Konten ini diterjemahkan menggunakan AI (Beta) dan mungkin mengandung kesalahan. Untuk melihat halaman ini dalam bahasa Inggris, klik di sini.


Rangkuman
Anggota yang Diwariskan
Contoh Kode
Mengukur Ukuran Teks
local TextService = game:GetService("TextService")
-- Deklarasikan parameter
local params = Instance.new("GetTextBoundsParams")
params.Text = "Halo dunia!"
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

Referensi API
Properti
Font
Baca Paralel
Kemampuan: UI
GetTextBoundsParams.Font:Font

RichText
Baca Paralel
Kemampuan: UI
GetTextBoundsParams.RichText:boolean

Size
Baca Paralel
Kemampuan: UI
GetTextBoundsParams.Size:number

Text
Baca Paralel
Kemampuan: UI
GetTextBoundsParams.Text:string

Width
Baca Paralel
Kemampuan: UI
GetTextBoundsParams.Width:number

©2026 Roblox Corporation. Roblox, logo Roblox, dan Powering Imagination termasuk dalam merek dagang kami yang terdaftar dan tidak terdaftar di AS dan negara lainnya.