I’m trying to make it so that I can select whatever children in a folder I can run through a certain event. This certain event would be a fire kill part. The kill part moves up while the fire particle is enabled. The problem is i’m using a pairs loop so it won’t process 2 of the children in my folder simultaneously. I’ve tried to copy it into another pairs loop in my while loop but it hasn’t worked. The thing I’m mainly trying to find out is how can I not make the pairs loop randomly select it rather simultaneously do it in a controlled manner.
local Flamers = workspace.Flamers:GetChildren()
while true do
task.wait(6)
for i, v in pairs(Flamers) do
v.HitPart.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = 0
end
end)
v.Reacter.ParticleEmitter.Enabled = true
v.HitPart.Position = Vector3.new(0,10,121)
task.wait(6)
v.Reacter.ParticleEmitter.Enabled = false
v.HitPart.Position = Vector3.new(0,-12,121)
end
end