generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: How do you check if a player is a certain rank?

Previous Thread :: Next Thread 
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
17 Nov 2012 09:26 PM
I know how to check if a player is in a group, but I dunno how to check if they're a certain rank, so...

Tactical Rainboom Inbound
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
17 Nov 2012 09:27 PM
player:GetRankInGroup ( groop ) -- Returns an int that is 1 - 255, the player's rank
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
17 Nov 2012 09:32 PM
Or :GetRoleInGroup(Int), which returns a string with the player's rank in the group.

¤¤ †KMXD† ¤¤
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
17 Nov 2012 09:33 PM
ORLY?
Report Abuse
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
17 Nov 2012 09:37 PM
What's wrong with this? It's hard for me to make it without a full example, so I'm pretty sure this is some HUGE fail:

game.Players.PlayerAdded:connect(function(player)
a = player:GetRankInGroup(708612)
if a == 255 or a == 254 then
player.TeamColor = BrickColor.new("Bright red")
end
end)

Tactical Rainboom Inbound
Report Abuse
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
17 Nov 2012 09:39 PM
Nevermind, the script worked. When I went into the game, I didn't even check which team I was on... -_-

Tactical Rainboom Inbound
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
17 Nov 2012 09:42 PM
game.Players.PlayerAdded:connect ( function ( player )
if player:GetRankInGroup ( 708612 ) >= 254 then
player.TeamColor = BrickColor.new ( "Bright red" )
end
end )

Chop code. AKA CC
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image