Skip to content

PlayerSpectateRequestPayload

What playerSpectateRequest gets: the payload a handler receives.

type PlayerSpectateRequestPayload = {
player: PlayerSnapshot; target: SpectateTarget; requestReason: "script" | "targetDisconnected" | "interiorChanged";
};
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".