|
| 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 |
|
|
|
| 06 Aug 2013 10:24 AM |
| Is it actually loading the leaderstats, because if it isn't, it will wait forever. |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
| |
|
|
| 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
|
  |
| 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
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
| |
|
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
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
| |
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
| |
|
|
| 06 Aug 2013 05:15 PM |
| Oh wow, I feel so idiotic. ty |
|
|
| Report Abuse |
|
|