배우기
엔진 클래스
TextButton

*이 콘텐츠는 AI(베타)를 사용해 번역되었으며, 오류가 있을 수 있습니다. 이 페이지를 영어로 보려면 여기를 클릭하세요.



API 참조
속성
ContentText
읽기 전용
복제되지 않음
병렬 읽기
기능: UI
TextButton.ContentText:string

Font
숨김
복제되지 않음
병렬 읽기
기능: UI
TextButton.Font:Enum.Font
코드 샘플
모든 글꼴 보기
local frame = script.Parent
-- 각 글꼴을 표시하는 TextLabel 생성
for _, font in pairs(Enum.Font:GetEnumItems()) do
local textLabel = Instance.new("TextLabel")
textLabel.Name = font.Name
-- 텍스트 속성 설정
textLabel.Text = font.Name
textLabel.Font = font
-- 일부 렌더링 속성
textLabel.TextSize = 24
textLabel.TextXAlignment = Enum.TextXAlignment.Left
-- 텍스트 높이에 맞게 프레임 크기 조정
textLabel.Size = UDim2.new(1, 0, 0, textLabel.TextSize)
-- 부모 프레임에 추가
textLabel.Parent = frame
end
-- 프레임을 목록으로 레이아웃(이미 레이아웃이 아닌 경우)
if not frame:FindFirstChildOfClass("UIListLayout") then
local uiListLayout = Instance.new("UIListLayout")
uiListLayout.Parent = frame
end

FontFace
병렬 읽기
기능: UI
TextButton.FontFace:Font

FontSize
사용되지 않음

LineHeight
병렬 읽기
기능: UI
TextButton.LineHeight:number

LocalizedText
숨김
읽기 전용
복제되지 않음
병렬 읽기
기능: UI
TextButton.LocalizedText:string

MaxVisibleGraphemes
병렬 읽기
기능: UI
TextButton.MaxVisibleGraphemes:number

OpenTypeFeatures
병렬 읽기
기능: UI
TextButton.OpenTypeFeatures:string

OpenTypeFeaturesError
읽기 전용
복제되지 않음
병렬 읽기
기능: UI
TextButton.OpenTypeFeaturesError:string

RichText
병렬 읽기
기능: UI
TextButton.RichText:boolean

Text
병렬 읽기
기능: UI
TextButton.Text:string
코드 샘플
사라지는 배너
local TweenService = game:GetService("TweenService")
local textLabel = script.Parent
local content = {
"내 게임에 오신 것을 환영합니다!",
"재미있게 놀아보세요!",
"제안해 주세요!",
"다른 플레이어에게 친절하세요!",
"다른 플레이어를 괴롭히지 마세요!",
"상점을 확인해 보세요!",
"팁: 죽지 마세요!",
}
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local RNG = Random.new()
local fadeIn = TweenService:Create(textLabel, tweenInfo, {
TextTransparency = 0,
})
local fadeOut = TweenService:Create(textLabel, tweenInfo, {
TextTransparency = 1,
})
local lastIndex
while true do
-- 0단계: 아무것도 하기 전에 사라지게 함
fadeOut:Play()
task.wait(tweenInfo.Time)
-- 1단계: 마지막에 표시되지 않았던 콘텐츠 선택
local index
repeat
index = RNG:NextInteger(1, #content)
until lastIndex ~= index
-- 다음 번에 동일한 것을 표시하지 않도록 해야 함
lastIndex = index
-- 2단계: 콘텐츠 표시
textLabel.Text = content[index]
fadeIn:Play()
task.wait(tweenInfo.Time + 1)
end
텍스트의 이모지
local textLabel = script.Parent
local moods = {
["happy"] = "😃",
["sad"] = "😢",
["neutral"] = "😐",
["tired"] = "😫",
}
while true do
for mood, face in pairs(moods) do
textLabel.Text = "나는 " .. mood .. " 기분이야! " .. face
task.wait(1)
end
end

TextBounds
읽기 전용
복제되지 않음
병렬 읽기
기능: UI
TextButton.TextBounds:Vector2

TextColor
사용되지 않음

TextColor3
병렬 읽기
기능: UI
TextButton.TextColor3:Color3
코드 샘플
카운트다운 텍스트
-- 이 코드를 TextLabel/TextButton 내의 LocalScript에 배치하세요
local textLabel = script.Parent
-- TextColor3와 함께 사용할 몇 가지 색상
local colorNormal = Color3.new(0, 0, 0) -- 검정색
local colorSoon = Color3.new(1, 0.5, 0.5) -- 빨간색
local colorDone = Color3.new(0.5, 1, 0.5) -- 초록색
-- 무한 루프
while true do
-- 10에서 1까지 카운트 다운
for i = 10, 1, -1 do
-- 텍스트 설정
textLabel.Text = "시간: " .. i
-- 남은 시간에 따라 색상 설정
if i > 3 then
textLabel.TextColor3 = colorNormal
else
textLabel.TextColor3 = colorSoon
end
task.wait(1)
end
textLabel.Text = "시작!"
textLabel.TextColor3 = colorDone
task.wait(2)
end

TextDirection
병렬 읽기
기능: UI
TextButton.TextDirection:Enum.TextDirection

TextFits
읽기 전용
복제되지 않음
병렬 읽기
기능: UI
TextButton.TextFits:boolean

TextScaled
병렬 읽기
기능: UI
TextButton.TextScaled:boolean

TextSize
병렬 읽기
기능: UI
TextButton.TextSize:number

TextStrokeColor3
병렬 읽기
기능: UI
TextButton.TextStrokeColor3:Color3

TextStrokeTransparency
병렬 읽기
기능: UI
TextButton.TextStrokeTransparency:number

TextTransparency
병렬 읽기
기능: UI
TextButton.TextTransparency:number

TextTruncate
병렬 읽기
기능: UI
TextButton.TextTruncate:Enum.TextTruncate

TextWrap
사용되지 않음

TextWrapped
병렬 읽기
기능: UI
TextButton.TextWrapped:boolean

TextXAlignment
병렬 읽기
기능: UI
TextButton.TextXAlignment:Enum.TextXAlignment

TextYAlignment
병렬 읽기
기능: UI
TextButton.TextYAlignment:Enum.TextYAlignment

©2026 Roblox Corporation. Roblox 및 Roblox 로고, 'Powering Imagination'은 미국 및 기타 국가 내 당사의 등록 및 미등록 상표입니다.