Most gyms are not allowed to bring friends in. This is because gyms usually adopt membership system, and only members can enter the gym. If non-members need to enter, they need to get permission from the gym management. At the same time, in order to ensure the order and safety of the gym, the gym will have some regulations and restrictions, such as swiping the card or signing in every time you enter, and restricting the entry of non-members.
Of course, if you and your friends are members of the gym, then you can enter the gym together. However, it should be noted that different gym regulations may be different. You need to check the specific gym regulations or consult the gym management.