Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

addTextChatMessage

addTextChatMessage(step, addTextChatMessageOptions): void

Writes a message into text chat from an authoritative system: a system message from the game, such as “The gates open in 10 seconds.”, or an NPC’s line with from. The room filters it and delivers it after the step, to to or to every player the channel reaches. In a game played alone the player’s page shows it. Throws for a text longer than textChatMessageLength and for from a player. As Roblox’s DisplaySystemMessage. Authoritative systems only: a predicted system re-runs, so its step is refused.

Parameter Type
step AuthoritativeStep & UnpredictedStep
addTextChatMessageOptions AddTextChatMessageOptions

void

addTextChatMessage(step, { text: "The gates open in 10 seconds." });
addTextChatMessage(step, { to: [player], text: ["You found ", item, "."] });
addTextChatMessage(step, { from: shopkeeper, text: "Fresh bread!" });