The title must’ve been confusing but I’m working on a script that uses a pairs loop to make flamers on the ground enable a particle emitter and move a kill part in the particle emitter. I have 4 of these flamers, and using the pair loops the script only goes through one of them but I want it go through all of them.
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