How would I enable a particle system based on size/magnitude?

I’m having trouble figuring out how I would enable this particle system located behind an object based on the player size.

For example; if the player’s too small to eat one of the enemies, a small glow would appear on, around or behind the enemy.

however if the player is large enough to eat the enemy, the particle system will disable itself, notifying the player of the safety, thus telling the player that particular enemy is safe to eat.

The player-growth code I have set in place utilizes magnitude

`

	if(transform.localScale.magnitude<5)

`

Lets say the player’s magnitude is a 2
and the enemy magnitude is a 3

How would I make it so that the particle system attached to the enemy be enabled when the player’s magnitude is <3 but disabled when the player’s magnitude is >3

This is the current script for enemy eating

if (other.tag == "Player")
{
 if(other.transform.localScale.magnitude<transform.localScale.magnitude)

I have it set that enemy magnitude is set manually, that if it’s bigger than the player, the enemy can “eat” the player.

Just set your particle system to be active. The code might be like the followings:

if( other.tag== "Player")
{
    if( other.transform.localScale.magnitude< transform.localScale.magnitude)
    {
        this.gameObject.particleEmitter.emit= true;
        ...
} else {
    this.gameObject.particleEmitter.emit= false;

Note that if yo disable the Emitter (i.e. gameObject.particleEmitter.enable= false), the whole particles would be frozen instead of disappeared.