1 | game.Players.PlayerAdded:Connect( function (player) |
2 | local Rank = player:GetRoleInGroup( 4937707 ) |
3 | if Rank = = ( 150 ) then |
4 | print ( "test" ) |
5 | end |
6 | end ) |
It doesn't print anything on my screen.
Maybe this could work?
1 | game.Players.PlayerAdded:Connect( function (player) |
2 | local Rank = player:GetRankInGroup( 4937707 ) |
3 | print (Rank) |
4 | if Rank = = 150 then |
5 | print ( "test" ) |
6 | end |
7 | print ( "2" ) |
8 | end ) |
you can remove the print statements i just used it to get info. it worked for a random group i was in / you just needed to remove the brackets around 150
or you could try:
1 | game.Players.PlayerAdded:Connect( function (player) |
2 | local Rank = player:GetRoleInGroup( 4937707 ) |
3 | print (Rank) |
4 | if Rank = = "ROLENAME" then |
5 | print ( "test" ) |
6 | end |
7 | print ( "2" ) |
8 | end ) |
1 | game.Players.PlayerAdded:Connect( function (player) |
2 | local Rank = player:GetRankInGroup( 4937707 ) |
3 | if Rank = = ( 150 ) then |
4 | print ( "test" ) |
5 | end |
6 | end ) |
You were using the wrong function, use GetRankInGroup
not GetRoleInGroup
.