Roblox Getrankingroup

Posted on

In Roblox, Roblox Studio is available to enable all Roblox users to make their own game. If you have an imagination, you are able to express your imagination into a fun game. For your information, if you make a game and then your game are visited by a lot of people so that it becomes popular, you have a chance to earn cash out from Roblox. It is amazing, isn’t it?

Besides creating games, you are also able to make a group in Roblox. You are able to make any group that you want. For example, you like playing Vehicle Simulator games. Then, you want to make a group so that it can be a place for you and other members to share any information related to Vehicle Simulator. Or maybe you have a game that you create by your own in Roblox, then you as a creator can make a group as a place for you and the players to share any information related to the game that you create.


Talk about group, in Roblox there is a built in function named GetRankInGroup. Whenever a role is made in a group, it is assigned to a number named the Rank. The number is 1-255 and it is important. GetRankInGroup can return the rank of player in the group as an integer between 0 and 255 which is 0 is a non member and 255 is the owner of the group.

Parameters

Name Type Default Description
groupId Int64

Returns

Return Type Summary
int

Then, you may want to know how to check the rank of a player in a group. The code that is given below will check if a player that has got into the game has a rank equal to 255, in a group with an ID of 2. In case they get into the game and has a rank equal to 255, it will say “Player is the owner of the group, ‘LOL’!”. But, if it is not, it will say “Player is NOT the owner of the group, ‘LOL’!”.

1. game. Players. PlayerAdded: Connect (function (Player)
2.          if Player: GetRankInGroup (2) == 255 then
3.               print that you will get is (“Player is the owner of the group, ‘LOL’!”)
4.          else
5.               print that you will get is (“Player is not the owner of the group, ‘LOL’!”)
6.          end
7. end)

You are able to access Roblox Wikia to see an example of using the formula above. In that site, they give an example of LOL group which was made by Shedletsky and that group has 5 roles as described in the table below.

Role Rank
Guest 0
Cheezburgers 1
Lieutenant of LOL 253
LOLCATS 254
God of LOL 255

Well, after you read a brief description above and also see the example in Roblox Wikia, then you are able to find rank by your own. Hopefully, it will be easy for you to do that. However, if you face any problem when you do that or you have any questions about that, you are able to ask that in a forum indevforum.roblox.com to get the answers of your questions.

Leave a Reply

Your email address will not be published. Required fields are marked *