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

Custom leaderboard doesnt show all names for some players? [closed]

Asked by 5 years ago
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(playerJ)
    for i,v in pairs(game.Players:GetChildren()) do
        local ptclone = game.ServerStorage.PlayerTemplate:Clone()
        ptclone.Name = playerJ.Name
        ptclone.PlayerName.Text = playerJ.Name
        ptclone.Parent = v.PlayerGui.ScreenGui.MainMenu.Multiplayer.Players
    end
end)

PlayerTemplate is the TextLabel template for each player that joins.

When I started a Test Server with 4 players this is what each player saw:

Player 1: -- everybody

Player 2: -- Player 2, Player 3, Player4

Player 3: -- Player 3, Player 4

Player 4: -- Player 3, Player 4

I am certain that the error is in this bit of code but I can't figure out what's going on, help is much appreciated!

0
The server-side is adding the players to the custom leaderboard? blowup999 659 — 5y

Locked by User#19524

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?