Hey, guys. I was trying to make a Custom Leaderboard Gui, but I got stuck because it wouldn't work right. The Gui is in this form: StarterGui > ScreenGui > Frame > Script. There is also a TextLabel inside ServerStorage. What my script was suppose to do was clone the TextLabel from ServerStorage into the Frame, as much times as there are the number of players, and make the text for all those TextLabels, all the players in the games' names.
local Player = script.Parent.Parent.Parent.Parent local x = script.Parent Template = game.ServerStorage.LeaderboardTemplate:clone() Players = game.Players:GetChildren() num = 35 playas = 0 while true do for i = 1, #Players do print(#Players) if playas < 8 then playas = playas +1 T2 = Template:clone() T2.Parent = x T2.Position = T2.Positoin + UDim2.new(0, 0, 0, num) T2.Name = "PlayerButton" T2.Text = Players[i].Name end end end
If anyone could explain to me what I did wrong, it would be very helpful!
Please remove the "#" from the word "Player" so it will work, you called it "Player" not "#Player".