Hey guys!
I'm trying to set up this really simple custom leaderboard that displays the rank and username of all players in-game. Everytime the leaderboard is opened it'll get the names, so it won't have to loop whilst open.
I have this code right now:
local plrs =game:GetService("Players") local plr = plrs.LocalPlayer local temp = script:WaitForChild("template") local id = 1 for i,v in pairs (plrs:GetChildren()) do local display = temp:Clone() display.Parent = script.Parent.display.ScrollingFrame display.Name = v.Name display.name.Text = v.Name if v:IsInGroup(id) then display.rank.Text = v:GetRoleInGroup(id) else display.rank.Text = "Guest" end display.Position = UDim2.new(0,0,0,60 * (i - 1)) end
when running this, it only displays the username of the one opening the leaderboard. When I play with 3 test users, each user only sees their own name on the top. There are no cloned displays from other users. Anyone know why my template isn't cloning for ALL players in-game, rather than just one?
EDIT: The leaderboard isn't like the ones you have on your top right of the screen. It's an actual GUI which would function as a leaderboard. See below
https://gyazo.com/9e6a66293414afa5701e84d895c75727
The best way to know something, is to ask, or watch. The previous one is easier at the moment. Watch this YouTube video