wait()
local Frame = script.Parent
local Template = Frame.Players
local Script = script
local Players = game:GetService("Players")
local function UpdateLeaderboard(Player)
local Count = 0
for i,v in pairs(Players:GetChildren()) do
Count = Count + 1
local Slot = Template:Clone()
Slot.Parent = Frame
local SlotY = 0.078 * Count
Slot:TweenPosition(UDim2.new(-0.254,0,SlotY,0), "Out", "Linear", 0)
Slot.Name = Player.Name
Slot.Text = Slot.Name
end
end
game.Players.PlayerAdded:Connect(function(Player)
UpdateLeaderboard(Player)
end)
game.Players.PlayerRemoving:Connect(function(Player)
UpdateLeaderboard(Player)
end)
How its setup: https://gyazo.com/0d3f65c7a7d320a744f0ec0be433747e
