Here's the code I have:
local players = game:WaitForChild("Players")
local function createLeaderboard(player)
local stats = Instance.new("Folder")
stats.Name = "leaderstats"
local rank = Instance.new("IntValue", stats)
rank.Name = "Rank"
rank.Value = 0
stats.Parent = player
end
players.PlayerAdded:connect(createLeaderboard)
Here's the code I want:
local players = game:WaitForChild("Players")
local function createLeaderboard(player)
local stats = Instance.new("Folder")
stats.Name = "leaderstats"
local rank = Instance.new("IntValue", stats)
rank.Name = "Guest" -- I know it's an error.
rank.Value = 0
stats.Parent = player
end
players.PlayerAdded:connect(createLeaderboard)
The last code had an error. Could you help me?

3 comments
Are you trying to make a leaderboard with group ranks in it?
It's not rank.Name, it's rank.Value + IntValue's is for numbers only.
You want to use a StringValue