Read Description [GUI if player is in 2 certain groups]

Ok, so if a person was in a 2 groups, a department group and a division group for that department, when they pick the department group from the team changer, it will pop a GUI up saying… "Would you like to be teamed to “Division group” with a “Yes” button changing there team, and a no button declining that offer, it’s to keep the team changer from look like a mess.

But the problem is how do I connect the 2 groups and make a GUI pop up? and I could use a little help on the Yes and No button, and how to cancel the respawn if the player is in the 2 groups.

PROBLEMS

-How to cancel respawning the player so the GUI can pop in.
-How to make the No Button continue with the respawn
-How to make the GUI pop up if the player is in the 2 groups

Store all the division group ID’s in a table, when the player spawns or joins (whatever your case is), use GroupService:GetGroupsAsync(playerId) to get all the groups the player is currently in. Iterate over these groups, if it finds a division group, then store it in a variable, and if it finds the department group then store it in a separate variable. If the player is in both the department and the division, then prompt him to join the division team or whatever.