What is the difference between
1 | game.Players.PlayerAdded |
2 | game.Players.LocalPlayer |
3 | game:GetService( "Players" ) |
4 | game.Players:GetPlayers() |
Is there any other way to get players? What can i use each for?
Game.Players.PlayerAdded is an event that fires when a new player joins the game.
Game.Players.LocalPlayer only works in a local script, and it returns the local client.
game:GetService("Players") returns the player service, which is the same thing as doing game.Players.
game.Players:GetPlayers() returns an array of all players currently in the game.