PlayerSpectateRequestPayload
What playerSpectateRequest gets: the payload a handler receives.
Definition
Section titled “Definition”type PlayerSpectateRequestPayload = { player: PlayerSnapshot; target: SpectateTarget; requestReason: "script" | "targetDisconnected" | "interiorChanged";};Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
player |
PlayerSnapshot |
The spectator. |
target |
SpectateTarget |
Who or what they would watch. A player who has left is their ID. |
requestReason |
"script" | "targetDisconnected" | "interiorChanged" |
Why it is asked. Renamed in 0.28 from reason, where "interiorChanged" was "areaChanged". |
Related
Section titled “Related”playerSpectateRequest: the decision