Boyfriends baby momma

My boyfriend is taking his baby momma to court to get visitation with his kids . She told me that I couldn’t be there while he has temporary visitation because it’s the law ? Is that true ?