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 » Scripters
Home Search
 

Re: getrankingroup not working

Previous Thread :: Next Thread 
gogo6104 is not online. gogo6104
Joined: 10 Feb 2010
Total Posts: 326
06 Nov 2016 12:00 PM
I made a script that gives a gui to a player on spawning if they're rank 2 or higher in a group, it's working for my player and everyone else won't get it and they're rank 2 or higher ;-;


Report Abuse
he_ro is online. he_ro
Joined: 08 Jun 2013
Total Posts: 634
06 Nov 2016 12:02 PM
Post the script.


Report Abuse
gogo6104 is not online. gogo6104
Joined: 10 Feb 2010
Total Posts: 326
06 Nov 2016 12:04 PM
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
if game.Players[player.Name]:GetRankInGroup(2957840) >= 2 then
script["Example Gui"]:Clone().Parent = player.PlayerGui
end
end)
end)


Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
06 Nov 2016 12:07 PM
id = 12341234 -- your group ID
rank = 2 -- make sure you are using the correct rank

game.Players.PlayerAdded:connect(function(player)
if player:GetRankInGroup(id) > 2 then
gui:Clone().Parent = player.PlayerGui
end
end)


Report Abuse
gogo6104 is not online. gogo6104
Joined: 10 Feb 2010
Total Posts: 326
06 Nov 2016 12:19 PM
I don't see how variables can help.


I made a door that puts a uniform on ranks 2 or higher and it works fine, why won't this work... ;-;


Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
06 Nov 2016 12:21 PM
Is this a server script in the ServerScriptService, or some other non-local directory like the Workspace?
Is it disabled by accident?


Report Abuse
gogo6104 is not online. gogo6104
Joined: 10 Feb 2010
Total Posts: 326
06 Nov 2016 12:22 PM
The one for giving gui is in server script service, the door is in workspace. The thing is the gui giver is working for me, and I'm rank 2 in the group, but it won't for others.



Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
06 Nov 2016 12:28 PM
I think you are confused about how ranks work, but correct me if I'm wrong.
You are actually in the 10th position in the group 2957840, which means you're undoubtedly higher than rank 2, no?

Also, is that your entire script?
If it only works for you and not others, perhaps you're moving the gui instead of cloning it, or perhaps your script stops working after it's done its duty once.


Report Abuse
gogo6104 is not online. gogo6104
Joined: 10 Feb 2010
Total Posts: 326
06 Nov 2016 12:29 PM
That's not the group ID because I didn't want to give away the actual group I'm developing this for


Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
06 Nov 2016 12:30 PM
Ranks in groups go from 0 to 255, 0 being anyone who's not enrolled, iirc.

You are certain that it's truly rank 2 you want?


Report Abuse
gogo6104 is not online. gogo6104
Joined: 10 Feb 2010
Total Posts: 326
06 Nov 2016 12:31 PM
Yes, this is confusing because I use the same line for both scripts. It works for the uniform, it doesn't for the gui.


Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
06 Nov 2016 12:32 PM
Examine other factors. It is likely not the script if this is the only code in it.


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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