for example, if a player joins how would a know? how would I know the person's username?
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)