assigning cinemachine target group in code.

im trying to make a drop in drop out fighting game so i have to assign the cameras targets when all the players have joined and the start button is pressed but the target group transform just goes to position 0,0,0 and stop…it doesn’t track with the players i’ve tried everything…i made a new scene and re wrote the code and it worked perfectly…its just nor working in the actual game… here is the code

public class CameraManger : MonoBehaviour
{
    public List<Transform> members;
    public CinemachineTargetGroup tg;
    public bool test;

    private void OnEnable()
    {
        GameStarter.Gamestarted += AssignCam;
    }
    private void OnDisable()
    {
        GameStarter.Gamestarted -= AssignCam;
    }

    public void AssignCam()
    {
        Transform[] Amembers = members.ToArray();
        for (int i = 0; i < Amembers.Length; i++)
        {
            tg.AddMember(Amembers*, 1, 2);*

}

}
}

all it converts the list of transforms that are added from another script when each player joins to an array then it adds them to the targetgroup when start is pressed

Never mind I found the problem
I was accessing the prefabs transform instead of the spawned game object