How do I detect when the player joins the game?

Hello! I’m making a function that only runs if the player has not joined the game, essnetially a new player. What is the function / event to detect if the player has joined the game?

6 Likes
game:GetService("Players").PlayerAdded:Connect()
9 Likes

In addition to what @GamesAllRuined said, you could also do :

game.Players.ChildAdded:Connect()
3 Likes

The simple one:

game.Players.PlayerAdded:Connect()
1 Like