코드 샘플
텍스트 크기 측정
local TextService = game:GetService("TextService")
-- 매개변수 선언
local params = Instance.new("GetTextBoundsParams")
params.Text = "안녕 세상!"
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)
endAPI 참조
속성