NEBULA • Roblox (9–12) Lesson 27 · Particle Effects & Visual FX
Slide 1/10
Lesson 27

Particle Effects & Visual FX

Bikin obyekmu jadi hidup: api, asap, percikan, dan cahaya—plus tombol untuk menyalakan/mematikan efek.

Hasil Akhir

  • Obyek “Torch” menyala (ParticleEmitter + PointLight)
  • ProximityPrompt untuk ON/OFF
  • Efek ledakan kecil saat blok disentuh

Langkah 1 — Template

  1. Buka Roblox Studio → pilih Baseplate
  2. Save project dulu ya

Langkah 2 — Buat Obyek “Torch”

Bagian Kayu

  • Workspace → Part (Cylinder)
  • Scale tipis & tinggi, Material Wood
  • Rename: Torch, Anchored=true

Api & Cahaya

  • Klik kanan TorchInsert ObjectParticleEmitter
  • Insert juga PointLight (Range: 12–15, Brightness: 2–3)

Langkah 3 — Atur ParticleEmitter

Property Utama

  • Rate: 25–40
  • Speed: 2–5
  • Lifetime: 0.6–1.2
  • Size: 0.5 → 0 (kurva mengecil)
  • Color: kuning → oranye → merah

Tips

  • Texture bisa diganti dari Toolbox (Fire/Smoke)
  • Matikan LockedToPart untuk efek lebih bebas

Langkah 4 — Toggle ON/OFF dengan ProximityPrompt

  1. Klik kanan TorchInsert ObjectProximityPrompt (ActionText: “Toggle Api”)
  2. Tambahkan Script di Torch:
-- Torch/Script
local torch = script.Parent
local fx = torch:FindFirstChildOfClass("ParticleEmitter")
local light = torch:FindFirstChildOfClass("PointLight")
local prompt = torch:FindFirstChildOfClass("ProximityPrompt")

local aktif = true
local function setOn(on)
  aktif = on
  if fx then fx.Enabled = on end
  if light then light.Enabled = on end
end
setOn(true)

prompt.Triggered:Connect(function(player)
  setOn(not aktif)
end)

Langkah 5 — Efek Ledakan Saat Disentuh

Tambahkan sebuah blok “BoomBlock” lalu susun script berikut:

-- BoomBlock/Script
local part = script.Parent
part.Touched:Connect(function(hit)
  if hit.Parent:FindFirstChild("Humanoid") then
    local e = Instance.new("Explosion")
    e.BlastRadius = 6
    e.BlastPressure = 200000
    e.Position = part.Position
    e.Parent = workspace
  end
end)

Catatan: atur BlastRadius kecil supaya aman untuk anak.

Langkah 6 — Polish

  • Tambahkan Smoke sebagai ParticleEmitter kedua (Rate kecil: 5–8)
  • Ubah warna PointLight ke oranye agar hangat
  • Duplikat Torch beberapa kali untuk suasana gua

Tips

  • Semakin tinggi Rate, semakin berat performa
  • Gunakan Enabled untuk mengaktif/nonaktifkan efek lewat kode
  • Letakkan efek di Attachment agar posisinya mudah diatur

Quiz (3 Pertanyaan)

Q1. Komponen untuk menyalakan/mematikan efek dari dekat adalah…
ClickDetector
ProximityPrompt
BillboardGui
Q2. Properti mana yang membuat partikel muncul lebih banyak tiap detik?
Rate
Lifetime
Color
Q3. Agar cahaya obor menyala, komponen yang digunakan adalah…
SurfaceLight
SpotLight
PointLight

Penutup & Checklist

  • ✅ Torch dengan ParticleEmitter + PointLight
  • ✅ Toggle ON/OFF via ProximityPrompt
  • ✅ Efek ledakan kecil saat disentuh