How do I get a player's role from his id even if he isn't in the game?

I want to get someone’s role in a group even if they aren’t currently in a game, how would I do this? I have their id, but getPlayerByUserId only works if the player is currently in the game.

You will want to use GroupService:GetGroupsAsync which returns the groups the player with the given ID is in.

3 Likes

To get the role of a player you can use
Player:GetRoleInGroup()

The thing is the player isn’t in the game, so I can’t do it like that.

I think this is what you need, you have GetIdFromNameAsync too.