Effects don't appear on multiplayer

Title said everything.
code:



if !IsValid(self.flare) then return end
	
	for k, v in pairs(ents.FindInSphere(self.flare:GetPos() , (GetConVarNumber("jb_abgun_flare_radius")))) do
	if v:IsNPC() or v:IsPlayer() and v!= self.Owner then
	self.flare:EmitSound("Missile.ShotDown")
	v:Ignite(10, 50)
	v:SetHealth(v:Health() - (GetConVarNumber("jb_abgun_flare_impact_dmg")))
	self.flare:Remove()
	

	
		for k, v in pairs(ents.FindInSphere(self.flare:GetPos() , 200)) do
	if v:IsNPC() or v:IsPlayer() and v!= self.Owner then
	v:Ignite(10, 50)
	end
	end
	
		for i = 1,(math.random(4,6)) do
	local effect = EffectData();
    effect:SetOrigin( v:GetPos() + Vector( math.random( -200, 200 ), math.random( -200, 200 ), 0 ) )
	util.Effect( "HelicopterMegaBomb", effect );
	end

	if (SERVER) then
	for i = 1,(math.random(8,13)) do
			local f = ents.Create( "env_fire" )
			f:SetPos( v:GetPos() + Vector( math.random( -100, 100 ), math.random( -100, 100 ), 0 ) )
			f:SetKeyValue( "health", math.random( 10, 13 ) )
			f:SetKeyValue( "firesize", "30" )
			f:SetKeyValue( "fireattack", "30" )
			f:SetKeyValue( "damagescale", "8.0" )
			f:SetKeyValue( "StartDisabled", "0" )
			f:SetKeyValue( "firetype", "0" )
			f:SetKeyValue( "spawnflags", "132" )
			f:SetOwner(self.Owner)
			f:Spawn()
			f:Fire( "StartFire", "", 0.2 )
	end
	for i = 1,(math.random(4,6)) do
	local effect = EffectData();
    effect:SetOrigin( v:GetPos() + Vector( math.random( -200, 200 ), math.random( -200, 200 ), 0 ) )
	util.Effect( "HelicopterMegaBomb", effect );
	end
	end
	end
	
	end
	end
	end


Some effects require the client calls them, others use shared code or are built to execute from the server.

The code you’re using is quite repetitive… ents.FindIn* functions are very resource intensive, if you’re going to use it more than once, it’s likely cheaper to call Distance on each entity while checking all instead of checking all twice.