OnPlayerJoin
onPlayerJoin
Triggered after a client has joined the server and received its authoritative player ID.
Availability
This event is available in server-side scripts.
Callback signature
onPlayerJoin(playerId)
Parameters
| Name | Type | Description |
|---|---|---|
playerId |
int |
The authoritative ID assigned to the joining player. |
Examples
Handle the event:
addEventHandler("onPlayerJoin", root, function(playerId)
outputChatBox("Welcome to the server!", playerId, 225, 195, 110)
end)
Notes
- The player may still be loading the game world; use onPlayerChatReady for chat UI readiness.