for example, if a player joins how would a know? how would I know the person's username?
COMMUNITY QUESTION
How do I track players?
2 answers
You would use PlayerAdded Event:
Game.Players.PlayerAdded:connect(function(newPlayer) -- Connects when a player joins.
-- Code
end)
game.Players.PlayerAdded:connect(function(plr)
print(plr.Name) -- Make sure output is open when testing this.
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
I like your answer, but you should add how the functions "p" is the player. More commonly, the last bits look like "(function(newPlayer)" and the newPlayer is equal to "game.Players.PlayerName"