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: Just need a bit of help qq

Previous Thread :: Next Thread 
TheDuckOfYork is not online. TheDuckOfYork
Joined: 07 Jan 2012
Total Posts: 6599
06 Aug 2013 10:23 AM
Sorry for posting this, I'm just terrible :c

game.Players.PlayerAdded:connect(function(P)
repeat wait() until P:findFirstChild("leaderstats")
local Rank = Instance.new("StringValue", P.leaderstats)
Rank.Name = "Rank"
Rank.Value = P:GetRoleInGroup(732674)
end)

I can only do extremely basic stuff with scripts, and I have been trying to edit this to first check if they are in the group, and if not, give them a rank based off of another group.

This is my attempt at it.

GroupID = 732674

game.Players.PlayerAdded:connect(function(P)
repeat wait() until P:findFirstChild("leaderstats")
local Rank = Instance.new("StringValue", P.leaderstats)
Rank.Name = "Rank"
if player:IsInGroup(GroupID) then
Rank.Value = P:GetRoleInGroup(732674)
else
Rank.Value = P:GetRoleInGroup(925966)
end)

But now, it just doesn't load the group role in leaderstats.

And, it doesn't give me any errors in output..
Report Abuse
mylifeis2cooldlol is not online. mylifeis2cooldlol
Joined: 08 Mar 2011
Total Posts: 874
06 Aug 2013 10:24 AM
Is it actually loading the leaderstats, because if it isn't, it will wait forever.
Report Abuse
TheDuckOfYork is not online. TheDuckOfYork
Joined: 07 Jan 2012
Total Posts: 6599
06 Aug 2013 10:25 AM
It's loading everything except for the text in the leaderboard telling what rank you are.
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
06 Aug 2013 10:34 AM
'if player:IsInGroup(GroupID) then'

You haven't defined 'player' anywhere.
Report Abuse
iIikeyou is not online. iIikeyou
Joined: 07 Mar 2012
Total Posts: 1659
06 Aug 2013 10:35 AM
u feeling ok leo?
Report Abuse
unholysoda is not online. unholysoda
Joined: 15 May 2010
Total Posts: 9024
06 Aug 2013 10:36 AM
GroupID = 732674
game.Players.PlayerAdded:connect(function(P)
repeat wait() until P:findFirstChild("leaderstats")
local Rank = Instance.new("StringValue", P.leaderstats)
Rank.Name = "Rank"
if P:IsInGroup(GroupID) then
Rank.Value = P:GetRoleInGroup(732674)
else
Rank.Value = P:GetRoleInGroup(925966)
end)

http://www.roblox.com/My/Groups.aspx?gid=66545
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
06 Aug 2013 10:38 AM
@iiikeyou,
And that has any relevance within this thread, because...?
Report Abuse
iIikeyou is not online. iIikeyou
Joined: 07 Mar 2012
Total Posts: 1659
06 Aug 2013 10:39 AM
because ur seeing things
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
06 Aug 2013 10:46 AM
I am not 'seeing things'.

GroupID = 732674
game.Players.PlayerAdded:connect(function(P)
repeat wait() until P:findFirstChild("leaderstats")
local Rank = Instance.new("StringValue", P.leaderstats)
Rank.Name = "Rank"
if player:IsInGroup(GroupID) then <<<<---- Look, right here. He's attempting to use a variable named 'player' but he hasn't made one. 'P' exists, 'player' does not.
Rank.Value = P:GetRoleInGroup(732674)
else
Rank.Value = P:GetRoleInGroup(925966)
end)
Report Abuse
iIikeyou is not online. iIikeyou
Joined: 07 Mar 2012
Total Posts: 1659
06 Aug 2013 10:47 AM
do you see that schoolbus
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
06 Aug 2013 10:55 AM
i c eht

its yolo
Report Abuse
TheDuckOfYork is not online. TheDuckOfYork
Joined: 07 Jan 2012
Total Posts: 6599
06 Aug 2013 05:15 PM
Oh wow, I feel so idiotic. ty
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