okay i think what i’m about to show explains everything
function VFX(viewmodel: Model, weapon: Tool)
local vfxPart: BasePart = viewmodel.Handle:FindFirstChild("VFXPart")
if not vfxPart then return end
local muzzleFlash: ParticleEmitter = vfxPart:FindFirstChild("MuzzleFlash")
local lightEmitter: PointLight = vfxPart:FindFirstChild("LightEmitter")
if not muzzleFlash or not lightEmitter then
warn("Muzzle flash or light emitter does not exist!")
print(muzzleFlash, lightEmitter)
return
end
local ammoType: StringValue = weapon:FindFirstChild("AmmoType")
if not ammoType then return end
if ammoType.Value == "NRG" then
muzzleFlash.Color = Color3.fromRGB(101, 147, 255) -- Blue
else
muzzleFlash.Color = Color3.fromRGB(255, 255, 0) -- Yellow
end
muzzleFlash:Emit(1)
coroutine.wrap(function()
lightEmitter.Enabled = true
task.wait(0.01)
lightEmitter.Enabled = false
end)()
end
bruh??
am i going crazy???