

Publishing a game is great, but improving it is more important for it to be successful. Instead, you can make an “OnPlayerAdded” function for handling the player’s entrance. The player gets created before the scripts connect to the “PlayerAdded” run.

Note that this event may not work as expected in the “solo” mode. Players.PlayerRemoving:Connect(function(player)Ĩ.

Players.PlayerAdded:Connect(function(player)Ĥ. local Players = game:GetService(“Players”)ģ. This property is often used with the “” event that fires whenever a player leaves the game.įor example, you can print a message when players join or leave the game:ġ. The “PlayerAdded” event activates whenever a new player enters a game. We’ll start with the PlayerAdded feature. You can add a new event called “PlayerAdded” to fire an event whenever a new person joins a game.Īlso, if you’re interested in the game stats and want to track the number of players that play your game at any given moment, you can use the Developer Stats.
