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 or GetRankInGroup? ;~;

Previous Thread :: Next Thread 
chimo88 is not online. chimo88
Joined: 20 Aug 2008
Total Posts: 2051
28 Dec 2013 01:03 AM
Which is what, and what is how. :3
Report Abuse
chimo88 is not online. chimo88
Joined: 20 Aug 2008
Total Posts: 2051
28 Dec 2013 01:04 AM
CONTEXT:

divisions = {
legion1 = 338444,
legion2 = 487112,
legion3 = 807889,
legion4 = 838483,
}

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:wait()
if player:GetRoleInGroup(333620) < 45 then
local _ = 0
for i,v in pairs(divisions) do
if player:IsInGroup(v) then
_ = _ + 1
end
end
if _ >= 2 then
game.Workspace.CommChannels.CH1.Value = Player.Name.." is in 2 divisions, removed."
player:Destroy()--player was capitilized
end
end
end)
Report Abuse
amazingmoney5 is not online. amazingmoney5
Joined: 26 Apr 2011
Total Posts: 1082
28 Dec 2013 01:07 AM
Suppose a person is the rank "Commander" with a role value of 175

player:GetRoleInGroup(ID) would return 175
player:GetRankInGroup(ID) would return "Commander"
Report Abuse
chimo88 is not online. chimo88
Joined: 20 Aug 2008
Total Posts: 2051
28 Dec 2013 01:10 AM
And that script looks right? Someone made it easier for me but I can't check if it's all good as it's over my head. :3 (thanks!)
Report Abuse
amazingmoney5 is not online. amazingmoney5
Joined: 26 Apr 2011
Total Posts: 1082
28 Dec 2013 01:12 AM
yea
but
not sure if an underscore can referenced as a variable because it's used in some part of Lua (metatables maybe? Im not sure)
Report Abuse
chimo88 is not online. chimo88
Joined: 20 Aug 2008
Total Posts: 2051
28 Dec 2013 01:18 AM
Okay. I have no clue, either way it doesn't do the job. :c
Report Abuse
amazingmoney5 is not online. amazingmoney5
Joined: 26 Apr 2011
Total Posts: 1082
28 Dec 2013 01:19 AM
ahhh
I got them mixed up
GetRole = the string
GetRank = the integer
Report Abuse
chimo88 is not online. chimo88
Joined: 20 Aug 2008
Total Posts: 2051
28 Dec 2013 01:28 AM
So it's to be switched? :o
Report Abuse
amazingmoney5 is not online. amazingmoney5
Joined: 26 Apr 2011
Total Posts: 1082
28 Dec 2013 01:30 AM
just change the one GetRoleInGroup() to GetRankInGroup() and it should work (ofc theres the underscore thing)
Report Abuse
chimo88 is not online. chimo88
Joined: 20 Aug 2008
Total Posts: 2051
28 Dec 2013 01:32 AM
And the underscore thing can be fixed how? (you get many kudos from this)
Report Abuse
amazingmoney5 is not online. amazingmoney5
Joined: 26 Apr 2011
Total Posts: 1082
28 Dec 2013 01:35 AM
change all _s in the script to di (or whatever variable you want, i just chose di for divisions in)
Report Abuse
chimo88 is not online. chimo88
Joined: 20 Aug 2008
Total Posts: 2051
28 Dec 2013 01:41 AM
Sadly it still doesn't kick my test alt. :c
Report Abuse
amazingmoney5 is not online. amazingmoney5
Joined: 26 Apr 2011
Total Posts: 1082
28 Dec 2013 01:43 AM
are you sure that
"game.Workspace.CommChannels.CH1.Value = Player.Name.." is in 2 divisions, removed.""

works?
if it doesn't then it would error and not destroy the player
Report Abuse
chimo88 is not online. chimo88
Joined: 20 Aug 2008
Total Posts: 2051
28 Dec 2013 01:46 AM
I'll just get rid of it to be certain. No need to be fancy if it doesn't work!! (brb then :D)
Report Abuse
amazingmoney5 is not online. amazingmoney5
Joined: 26 Apr 2011
Total Posts: 1082
28 Dec 2013 01:49 AM
if that doesnt fix it then i have no idea how to
Report Abuse
chimo88 is not online. chimo88
Joined: 20 Aug 2008
Total Posts: 2051
28 Dec 2013 01:51 AM
:D Thank you SO much, Money. :D
Report Abuse
amazingmoney5 is not online. amazingmoney5
Joined: 26 Apr 2011
Total Posts: 1082
28 Dec 2013 01:53 AM
did it work
also
just check the hierarchy leading to the CH1, that's probably what caused the error (assuming this did indeed fix it)
Report Abuse
chimo88 is not online. chimo88
Joined: 20 Aug 2008
Total Posts: 2051
28 Dec 2013 01:58 AM
True, I will do that later. But I have work tomorrow and shopping for a special someone's gift, etc.. Haha. :P
Report Abuse
amazingmoney5 is not online. amazingmoney5
Joined: 26 Apr 2011
Total Posts: 1082
28 Dec 2013 01:58 AM
ya
im really tired
goodnight and im glad it eventually worked for you
Report Abuse
chimo88 is not online. chimo88
Joined: 20 Aug 2008
Total Posts: 2051
28 Dec 2013 02:01 AM
Goodnight :3

I will add a cameo when I have the chance to my map. I'm that happeh :3
Report Abuse
admiralsharp is not online. admiralsharp
Joined: 20 Feb 2009
Total Posts: 383
28 Dec 2013 06:06 AM
lolchimo, wouldn't you be banned instantly with this?
Report Abuse
AliveSparta13 is not online. AliveSparta13
Joined: 21 Dec 2012
Total Posts: 76
28 Dec 2013 02:23 PM
spam clean
Report Abuse
HappyNyancat423 is not online. HappyNyancat423
Joined: 14 Jan 2012
Total Posts: 2
02 Jan 2014 09:04 AM
omg
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
02 Jan 2014 09:07 AM
too much United World Federation here
Report Abuse
worldguy26 is not online. worldguy26
Joined: 24 Nov 2012
Total Posts: 9
03 Jan 2014 01:23 AM
^ you mad bro?
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