Hello Everybody,
I have a part with 5 children 1 being the core emitter and 4 being the normal emitters. What I basically need is a way to randomly select 1 of the 4 children but excluding the core emitter. Is there a way I can do that?

Hello Everybody,
I have a part with 5 children 1 being the core emitter and 4 being the normal emitters. What I basically need is a way to randomly select 1 of the 4 children but excluding the core emitter. Is there a way I can do that?

Use math.random(1,#Explosion:GetChildren)
local randomEmitter = Explosion:GetChildren()[math.random(1,#Explosion:GetChildren)]
local regularEmitters = {}
for _, child in ipairs(explosion:GetChildren()) do
if child.Name ~= "CoreEmitter" then
table.insert(regularEmitters, child)
end
end
local randomEmitter = regularEmitters[math.random(1, #regularEmitters)]