> For the complete documentation index, see [llms.txt](https://developers.brickverse.gg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.brickverse.gg/bricklua-coding-with-lua/player-event.md).

# Player Event

<figure><img src="/files/mMAEiMJoSMGgjF1Rk2nl" alt=""><figcaption></figcaption></figure>

## Creating the event

We will use the PlayerConnected Event to listen when a player connects.

```lua
game.PlayerService.OnPlayerJoin:Connect(function(Player)
    print(Player.Name.." says Hello to the World!");
end)
```

Here this code will now execute when a player connects and prints.

## What's returned in player?

```lua
{
    Name =  "BrickVerse", -- Username
    UserId = 1, -- UserId
    Character = -- Character
    Avatar = -- BrickThumb render
}
```
