Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

I dont know what im doing wrong?!?

Asked by 11 years ago

Please fix this?

01local GroupID = 1072475
02 
03game.Players.PlayerAdded:connect(function(player)
04local stats = Instance.new("IntValue")
05local rank = Instance.new("StringValue", stats)
06rank.Value =player:GetRoleInGroup(GroupID)
07stats.Parent = player
08--[[player.CharacterAdded:connect(function(character)
09local groupSpawns = game.Workspace:FindFirstChild("GroupSpawns"):GetChildren()
10local torso = character:WaitForChild("Torso")
11torso.CFrame = CFrame.new(groupSpawns[math.random(1,#groupSpawns)].Position)
12end)]]
13end)

2 answers

Log in to vote
0
Answered by 11 years ago
01local GroupID = 1072475
02 
03game.Players.PlayerAdded:connect(function(player)
04local stats = Instance.new("IntValue")
05stats.Name = "leaderboard"
06local rank = Instance.new("StringValue", stats)
07rank.Name = "Rank"
08rank.Value = player:GetRankInGroup(GroupID) -- Here was the error.
09stats.Parent = player
10end)

Corrected...

01local GroupID = 1072475
02 
03game.Players.PlayerAdded:connect(function(player)
04local stats = Instance.new("IntValue")
05stats.Name = "leaderboard"
06local rank = Instance.new("StringValue", stats)
07rank.Name = "Rank"
08rank.Value = tosting(player:GetRoleInGroup(GroupID)) -- Here is corrected
09stats.Parent = player
10end)
0
You need to provide explanation as well. coo1o 227 — 11y
Ad
Log in to vote
-1
Answered by 11 years ago

Try making the variable GroupID global instead of local.

Answer this question