I know the title is a bit confusing but I’ll try explaining.
I have 2 ParticleEmitters that I need to emit once a “Ball”/Object collides with a player/character, here’s how the effects look like:
And here’s how it currently looks like:
I’ve tried various things, none of them work. Can anyone help?
This is my code for reference:
local function ballRemoved(ball : BasePart)
local exploVFX = Instance.new("Part")
exploVFX.Name = "VFX"
exploVFX.Transparency = 1
exploVFX.Anchored = true
exploVFX.CanCollide = false
exploVFX.Size = Vector3.new(0.1, 0.1, 0.1)
exploVFX.CFrame = ball.CFrame
exploVFX.Parent = workspace
local effect1 = rp.ExploVFX.ParticleEmitter1:Clone()
effect1.Parent = exploVFX
local effect2 = rp.ExploVFX.ParticleEmitter2:Clone()
effect2.Parent = exploVFX
game.Debris:AddItem(ball, 0)
game.Debris:AddItem(exploVFX, 2)
for i, v in pairs(exploVFX:GetDescendants()) do
if v:IsA("ParticleEmitter") then
v:Emit()
task.wait()
end
end
end
while doing a for loop, you’re basically searching through every descendant of the exploVFX, so it detects both the black and white particles, it just searches through one of them first, then the other. In any case, the white particles should be the first the loop searches through. (Sorry if my explanation is weird)