Hey
If I could, I would post this under bug reports.
I have made an explosion effect with mutliple particle emitters and want to emit via script. Some emitters should emit 1, some should emit 10.
When I loop through the emitters like below, it does not work.
-- get parent part of emitters
local part = workspace:WaitForChild("EmitterParent")
-- get emitters
local emitters = part:GetChildren()
-- go through emitters, emit 10 if named "1x10", emit 1 else
for _, e in pairs(emitters) do
if e.Name == "1x10"then
e:Emit(10)
else
e:Emit(1)
end
end
If I use :FindFirstChild("1x10")
, it works. But this would be inconvenient. Itโs weird that e.Name == "1x10"
doesnโt work but print(e.Name)
would output โ1x10โ on the respective emitter.
Doe sanyone know why this is and how I can fix it?