Player:IsAnAlly(gID) and Player:IsAnEnemy(gID)

Pretty self-explanatory. It’d be nice to be able to tell whether or not a player is in an Allied group or Enemy group. The gID would be the group that’s being checked whether or not they’re an ally of.

Example: player123 is in FEAR, which is an ally of Vortex Security. Vortex Security’s group ID is 199219. game.Players.player123:IsAnAlly(199219) would return true.

ROBLOX actually added GroupService:GetAlliesAsync() and GroupService:GetEnemiesAsync() a while back. You can fetch a list of a group’s allies/enemies and then check to see if the target player is in any of them. This is probably better than IsAlly/IsEnemy too because with IsAlly/IsEnemy you’d have to loop through all of their groups and check to see if they’re an enemy/ally of the target group, but with GetAlliesAsync/GetEnemiesAsync, you’re just looping through the list of allies/enemies a group has. Groups tend to not have large amounts of allies/enemies, so you’d be checking less than if you were looking at a player who was in 100 groups that all needed to be checked.

Thanks Echo, I actually didn’t know that!