Pelajari
Kelas Engine
Trail

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


Contoh Kode
Membuat Bagian dengan Jejak Dasar
local TweenService = game:GetService("TweenService")
-- Buat bagian induk
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
-- Buat lampiran pada bagian
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
-- Buat jejak baru
local trail = Instance.new("Trail")
trail.Attachment0 = attachment0
trail.Attachment1 = attachment1
trail.Parent = part
-- Tween bagian untuk menampilkan jejak
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

Referensi API
Properti
Attachment0
Baca Paralel
Kemampuan: Basic
Trail.Attachment0:Attachment

Attachment1
Baca Paralel
Kemampuan: Basic
Trail.Attachment1:Attachment

Brightness
Baca Paralel
Kemampuan: Basic
Trail.Brightness:number

Color
Baca Paralel
Kemampuan: Basic
Trail.Color:ColorSequence
Contoh Kode
Membuat Jejak dengan Gradasi Warna
local TweenService = game:GetService("TweenService")
-- Buat bagian induk
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
-- Buat lampiran pada bagian
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
-- Buat jejak baru dengan gradasi warna
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
-- Tween bagian untuk menampilkan jejak
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
Baca Paralel
Kemampuan: Basic
Trail.Enabled:boolean

FaceCamera
Baca Paralel
Kemampuan: Basic
Trail.FaceCamera:boolean

Lifetime
Baca Paralel
Kemampuan: Basic
Trail.Lifetime:number

LightEmission
Baca Paralel
Kemampuan: Basic
Trail.LightEmission:number

LightInfluence
Baca Paralel
Kemampuan: Basic
Trail.LightInfluence:number

LocalTransparencyModifier
Tersembunyi
Tidak Direplikasi
Baca Paralel
Kemampuan: Basic
Trail.LocalTransparencyModifier:number

MaxLength
Baca Paralel
Kemampuan: Basic
Trail.MaxLength:number

MinLength
Baca Paralel
Kemampuan: Basic
Trail.MinLength:number

Texture
Baca Paralel
Kemampuan: Basic
Trail.Texture:ContentId
Contoh Kode
Membuat Jalur dengan Tekstur Jejak Kaki
local TweenService = game:GetService("TweenService")
-- Buat part induk
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
-- Buat lampiran pada part
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
-- Buat jalur baru dengan gradasi warna
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
-- Tween part untuk menampilkan jalur
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
Baca Paralel
Kemampuan: Basic
Trail.TextureLength:number

TextureMode
Baca Paralel
Kemampuan: Basic
Trail.TextureMode:Enum.TextureMode

Transparency
Baca Paralel
Kemampuan: Basic
Trail.Transparency:NumberSequence

WidthScale
Baca Paralel
Kemampuan: Basic
Trail.WidthScale:NumberSequence

Metode
Clear
Kemampuan: Basic
Trail:Clear():()
Memberikan nilai
()

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