Skip to content

SetPlayerTeam

Write the player-slot team in local lobby options.

options:SetPlayerTeam(slot, value)

Inputs: slot is a zero-based lobby slot integer in 0..7; value is an integer ID.

Output: true when the local lobby options write succeeds; otherwise false. This does not confirm replication or host acceptance.

Errors and unavailable states: A non-integer slot or value raises a Lua argument error. An out-of-range slot, unavailable lobby, active match, missing layout, or failed write returns false.

Call on a fresh value from GetCurrentGameOptions(). See Lobby options overview.