배우기
엔진 클래스
Trail

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


코드 샘플
기본 트레일이 있는 파트 만들기
local TweenService = game:GetService("TweenService")
-- 부모 파트 생성
local part = Instance.new("Part")
part.Material = Enum.Material.SmoothPlastic
part.Size = Vector3.new(4, 1, 2)
part.Position = Vector3.new(0, 5, 0)
part.Anchored = true
part.Parent = workspace
-- 파트에 부착물 생성
local attachment0 = Instance.new("Attachment")
attachment0.Name = "Attachment0"
attachment0.Position = Vector3.new(-2, 0, 0)
attachment0.Parent = part
local attachment1 = Instance.new("Attachment")
attachment1.Name = "Attachment1"
attachment1.Position = Vector3.new(2, 0, 0)
attachment1.Parent = part
-- 새로운 트레일 생성
local trail = Instance.new("Trail")
trail.Attachment0 = attachment0
trail.Attachment1 = attachment1
trail.Parent = part
-- 트레일을 표시하기 위해 파트를 트윈
local dir = 15
while true do
dir *= -1
local goal = { Position = part.Position + Vector3.new(0, 0, dir) }
local tweenInfo = TweenInfo.new(3)
local tween = TweenService:Create(part, tweenInfo, goal)
tween:Play()
task.wait(4)
end

API 참조
속성
Attachment0
병렬 읽기
기능: Basic
Trail.Attachment0:Attachment

Attachment1
병렬 읽기
기능: Basic
Trail.Attachment1:Attachment

Brightness
병렬 읽기
기능: Basic
Trail.Brightness:number

Color
병렬 읽기
기능: Basic
Trail.Color:ColorSequence
코드 샘플
색상 그라디언트로 트레일 만들기
local TweenService = game:GetService("TweenService")
-- 부모 파트 생성
local part = Instance.new("Part")
part.Material = Enum.Material.SmoothPlastic
part.Size = Vector3.new(4, 1, 2)
part.Position = Vector3.new(0, 5, 0)
part.Anchored = true
part.Parent = workspace
-- 파트에 첨부물 생성
local attachment0 = Instance.new("Attachment")
attachment0.Name = "Attachment0"
attachment0.Position = Vector3.new(-2, 0, 0)
attachment0.Parent = part
local attachment1 = Instance.new("Attachment")
attachment1.Name = "Attachment1"
attachment1.Position = Vector3.new(2, 0, 0)
attachment1.Parent = part
-- 색상 그라디언트로 새 트레일 생성
local trail = Instance.new("Trail")
trail.Attachment0 = attachment0
trail.Attachment1 = attachment1
local color1 = Color3.fromRGB(255, 0, 0)
local color2 = Color3.fromRGB(0, 0, 255)
trail.Color = ColorSequence.new(color1, color2)
trail.Parent = part
-- 트레일을 표시하기 위해 파트를 트윈
local dir = 15
while true do
dir *= -1
local goal = { Position = part.Position + Vector3.new(0, 0, dir) }
local tweenInfo = TweenInfo.new(3)
local tween = TweenService:Create(part, tweenInfo, goal)
tween:Play()
task.wait(4)
end

Enabled
병렬 읽기
기능: Basic
Trail.Enabled:boolean

FaceCamera
병렬 읽기
기능: Basic
Trail.FaceCamera:boolean

Lifetime
병렬 읽기
기능: Basic
Trail.Lifetime:number

LightEmission
병렬 읽기
기능: Basic
Trail.LightEmission:number

LightInfluence
병렬 읽기
기능: Basic
Trail.LightInfluence:number

LocalTransparencyModifier
숨김
복제되지 않음
병렬 읽기
기능: Basic
Trail.LocalTransparencyModifier:number

MaxLength
병렬 읽기
기능: Basic
Trail.MaxLength:number

MinLength
병렬 읽기
기능: Basic
Trail.MinLength:number

Texture
병렬 읽기
기능: Basic
Trail.Texture:ContentId
코드 샘플
발자국 텍스처로 트레일 만들기
local TweenService = game:GetService("TweenService")
-- 부모 파트 생성
local part = Instance.new("Part")
part.Material = Enum.Material.SmoothPlastic
part.Size = Vector3.new(2, 1, 2)
part.Position = Vector3.new(0, 5, 0)
part.Anchored = true
part.Parent = workspace
-- 파트에 부착물 생성
local attachment0 = Instance.new("Attachment")
attachment0.Name = "Attachment0"
attachment0.Position = Vector3.new(-1, 0, 0)
attachment0.Parent = part
local attachment1 = Instance.new("Attachment")
attachment1.Name = "Attachment1"
attachment1.Position = Vector3.new(1, 0, 0)
attachment1.Parent = part
-- 색상 그라디언트로 새로운 트레일 생성
local trail = Instance.new("Trail")
trail.Attachment0 = attachment0
trail.Attachment1 = attachment1
trail.Texture = "rbxassetid://16178262222"
trail.TextureMode = Enum.TextureMode.Static
trail.TextureLength = 2
trail.Parent = part
-- 트레일을 표시하기 위해 파트 트윈
local dir = 15
while true do
dir *= -1
local goal = { Position = part.Position + Vector3.new(0, 0, dir) }
local tweenInfo = TweenInfo.new(3)
local tween = TweenService:Create(part, tweenInfo, goal)
tween:Play()
task.wait(4)
end

TextureLength
병렬 읽기
기능: Basic
Trail.TextureLength:number

TextureMode
병렬 읽기
기능: Basic
Trail.TextureMode:Enum.TextureMode

Transparency
병렬 읽기
기능: Basic
Trail.Transparency:NumberSequence

WidthScale
병렬 읽기
기능: Basic
Trail.WidthScale:NumberSequence

메서드
Clear
기능: Basic
Trail:Clear():()
반환
()

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