How would I go about making a script store players who join

So basically I am making a tournament and i want the players who joined to get stored in a script and I want the Ui to show the players who joined the tournament but I don;t know how to go about scripting it. How would I go about scripting it and thank you for your help.

Will give you an example of something that you can build off of.

When a player joins add them to a table of contestants in your tournament.

local Players = game:GetService("Players")

local tournament_contestants = { Players.LocalPlayer }

Players.PlayerAdded:Connect(function(client)
    table.insert(tournament_contestants, client)
end)

And then use that table to show their name or something in a GUI. As I said, this is more of a base for what you want. So you can build off of that.

2 Likes