How to make Monster to spawn Fireball when its AnimationParameter is true. ?

I can get the Monster to spawn Object based on CastTime, but I am looking for a solution to get it spawn based on its AnimationTrigger Event.
This works when host and server is editor. But does not work in the build game. The « CanMonsterFire » variable always remains false.Any suggestions on how to get it done ?Thanks in advance.
5258348--525737--MonsterAttackStart.jpg

void Update()
    {

        if (!isServer)
            return;
        Debug.Log("CanMonsterFire == " + CanMonsterFire);
        //Variable CanMonsterFire is always false when running Serveronly
        //When running from Editor Host as Server and Play, it works
        if (CanMonsterFire == false)
        {
            animator.SetBool("CASTING", true);
            animator.SetBool("TESTING", true);
        }
        else
        {
            SpawnFire();
        }

    }
    public void SpawnFire()
    {
        CmdSpawnFire();
    }
    [Command]
    public void CmdSpawnFire()
    {
        Debug.Log("CmdSpawnFire");
        GameObject instance = (GameObject)Instantiate(shot, shotSpawn.position, shotSpawn.rotation);
        NetworkServer.Spawn(instance);

    }
    public void MonsterAttackStart()
    {
        Debug.Log("EventCalled start");
        CanMonsterFire = true;
    }

So you’re seeing “EventCalled start” in your player log of your build, but CanMonsterFire is still false?

Yes, only when running Client in Editor, i can see that log.

It works when Editor is Server & Play.