01
local GroupID = 1
02
03
game.Players.PlayerAdded:connect(function(player)
04
local stats = Instance.new("IntValue")
05
local rank = Instance.new("StringValue", stats)
06
rank.Value =player:GetRoleInGroup(GroupID)
07
stats.Parent = player
08
--[[player.CharacterAdded:connect(function(character)
09
local groupSpawns = game.Workspace:FindFirstChild("GroupSpawns"):GetChildren()
10
local torso = character:WaitForChild("Torso")
11
torso.CFrame = CFrame.new(groupSpawns[math.random(1,#groupSpawns)].Position)
12
end)]]
13
end)
I'm putting it in StarterGui, Workspace, StarterPack, ServerScriptService, etc and it doesn't work.
I'm putting the group id in the second line where it says local GroupID = (my group id here) am I doing this correctly?
I'm totally new to scripting, and i'd appreciate it if you helped me out. Thanks!

17 comments
Sorry, i'm confused on what you mean by "The script isn't correct in order for it to show in a leaderboard you need to have the stat's name equal to "leaderstats" and rank's name to "Rank"."
Basically you need to have the first IntValue's name set to leaderstats (leaderstats.Name = "leaderstats") and set the other variable(Rank)'s name to "Rank" (Rank.Name = "Rank")
Err, it's set up like that. Sorry, i'm very new to scripting and I don't really understand.
You have to call Rank.Name = "Rank" to set what the stat's Name is. You have to call leaderstats.Name = "leaderstats" so it'll show the Rank's Value.
I don't understand by leaderstats, but i'll try the script.
Nope, did not work.
Leaderstats hold all the stats to show, as long as the name is "leaderstats" you should see all of the values excluding ObjectValues.
The name is leaderstats. I took the code as it was but changed the id = (my group rank here) and that is all.
What is it doing?
Not really anything. It just shows the player list normally.
Anything in the lua output?
Lua output?
The output in Roblox Studio
Don't know what you mean. :|
https://www.dropbox.com/s/xjgpz8d5d5971mh/Screenshot%202014-05-10%2020.28.10.png
Oh, it says error, etc. I'm not really sure.
Could you run the script again and put the error into pastebin? No account needed.