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

How do I make a leaderboard?

Asked by 4 years ago
Edited 4 years ago

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

Log in to vote
0
Answered by 4 years ago

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) ~~~~~~~~~~~~~~~~~

Ad

Answer this question