Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a leaderboard?

Hello, i have a problem. I'm trying to make a leaderboard and have lines. They don't stand straight. Script:

local example = script.Parent.Example:Clone()
local number = 0
example.Parent = script.Parent
example.Visible = true
example.Position = UDim2.new(0, 0, 0, 20)
function addPlace()
	number = number + 90
	example = script.Parent.Example:Clone()
	example.Parent = script.Parent
	example.Visible = true
	example.Name = "Place"
example.Position = UDim2.new(0, 0, 0, number)
end

addPlace()
addPlace()
addPlace()

Screenshot

Edit: I did it, but tell me how to make it easier

1 answer

✓ Accepted answer

try this ~~~~~~~~~~~~~~~~~ -- In 'ServerScriptService', add this into a script named 'PlayerSetup' local function onPlayerJoin(player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player

-- Display an 'IntValue' on leaderboard
local gold = Instance.new("IntValue")
gold.Name = "Gold"
gold.Value = 0
gold.Parent = leaderstats

end

-- Run 'onPlayerJoin()' when the 'PlayerAdded' event fires game.Players.PlayerAdded:Connect(onPlayerJoin)


This discussion is preserved as it was. New answers, comments, and votes are closed.