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: GetRoleInGroup() help

Previous Thread :: Next Thread 
Lazulite is not online. Lazulite
Joined: 09 Jun 2014
Total Posts: 1217
23 Jun 2014 03:23 PM
Problem: It's always giving me "ERROR: RANK NOT FOUND". It should give me [C2] Chief.
This is a script.
Structure:
Script < Textbox < Frame < Gui < PlayerGui < ?Player?

local player = script.Parent.Parent.Parent.Parent.Parent
local t = script.Parent
local rank = player:GetRoleInGroup(753797)

-- TODO: Switch if / else structure to key / value pairs in table

if rank == 2 then
t.Text = "[L1] TRIBUTARY"
elseif rank == 3 then
t.Text = "[L2] NOVICE"
elseif rank == 4 then
t.Text = "[L3] NEOPHYTE"
elseif rank == 5 then
t.Text = "[L4] GLADIATOR"
elseif rank == 6 then
t.Text = "[L5] KNIGHT"
elseif rank == 7 then
t.Text = "[L6] BLADEMASTER"
elseif rank == 8 then
t.Text = "[M1] BANE"
elseif rank == 9 then
t.Text = "[M2] ADMIRAL"
elseif rank == 10 then
t.Text = "[M3] GENERAL"
elseif rank == 11 then
t.Text = "[M4] WARLORD"
elseif rank == 12 then
t.Text = "[M5] PRIME"
elseif rank == 13 then
t.Text = "[-] FOREIGN DIPLOMAT"
elseif rank == 14 then
t.Text = "[H1] CENTURION"
elseif rank == 15 then
t.Text = "[H2] ROYAL"
elseif rank == 16 then
t.Text = "[H3] IMMORTAL"
elseif rank == 17 then
t.Text = "[H4] IMPERIAL"
elseif rank == 18 then
t.Text = "[C1] HICOM"
elseif rank == 255 then
t.Text = "[C2] CHIEF"
else
t.Text = "ERROR: RANK NOT FOUND"
end
Report Abuse
calebpwns1002 is not online. calebpwns1002
Joined: 29 Mar 2013
Total Posts: 521
23 Jun 2014 03:24 PM
GetRankInGroup*
Report Abuse
Lazulite is not online. Lazulite
Joined: 09 Jun 2014
Total Posts: 1217
23 Jun 2014 03:26 PM
no its GetRoleInGroup() alex get good at RBX.Lua !111
Report Abuse
calebpwns1002 is not online. calebpwns1002
Joined: 29 Mar 2013
Total Posts: 521
23 Jun 2014 03:28 PM
Were you not trying to see what rank they are?
Report Abuse
Lazulite is not online. Lazulite
Joined: 09 Jun 2014
Total Posts: 1217
23 Jun 2014 03:28 PM
http://wiki.roblox.com/index.php?title=GetRoleInGroup_(Method)
Report Abuse
youssef04 is not online. youssef04
Joined: 22 Jan 2011
Total Posts: 1745
23 Jun 2014 03:30 PM
Laz, she's right, use GetRankInGroup(), you can do something.Text = GetRankInGroup(4736)
Report Abuse
Lazulite is not online. Lazulite
Joined: 09 Jun 2014
Total Posts: 1217
23 Jun 2014 03:31 PM
nooo

Alex got an RBX.Lua question right

can't have this happen!

will test it thanks
Report Abuse
IAmTheRolo is not online. IAmTheRolo
Joined: 12 Nov 2013
Total Posts: 859
23 Jun 2014 03:32 PM
GetRoleInGroup() returns a string, not a number.
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