This is for a leaderboard that shows the player's names in a gui. Also, am I using the right table globals to insert the player name there?
-- server script
game.Players.PlayerAdded:Connect(function(player)
game.ReplicatedStorage:WaitForChild("LeaderboardEvents"):WaitForChild("RemoteEvent"):FireClient()
end)
--localscript
local players = {}
game.ReplicatedStorage.LeaderboardEvents.RemoteEvent.OnClientEvent:Connect(function(player)
table.insert(players,1,player.Name)
script.Parent.Text = players[1] or ""
end)
Any help is welcome.

1 comment
Okay, I just got a problem with how to send the player name through the parameter, but I actually figured it out. Thanks.