Tutorial:An intro to players

Thundermaker300 here with a tutorial on objects. These objects are essential to games, as they contain properties of an in-game user.

Joining and Leaving
When a player joins a game, a player object is added into the "Players" service.

The player object is removed when a player leaves the game. When a player object is added to the service, game.Players.PlayerAdded is called. When a player object is about to be removed, game.Players.PlayerRemoving is called.

UserId
The first property I will go through is UserId. Each player, when joining Roblox, has a unique identifier, called the UserId. The UserId can be obtained two different ways. It can be obtained by going to someone's profile, shown in the picture. The second way is by using the UserId property of a Player object.

MembershipType
This property determines the membership this player has. It is an enum, and can either be None, BuildersClub, TurboBuildersClub, or OutrageousBuildersClub.

Character
This property is a model in. This is the avatar of the player that interacts, walks, jumps, etc.

Using Properties In Code
We have all these properties, but what should we do with them? There is many different things you can do using these properties. Here are some examples you can do using these.