Skip to content

onPlayerInput

KabanFriends edited this page Jan 11, 2024 · 3 revisions

function: onPlayerInput(event)

A function that is called when a player uses the /input <text> command or says $<text> in chat.
The event object contains following fields:

player : Player

  • The Player that triggered this event.

message : string

  • The inputted text of this event.

args : table

  • The inputted text, split at (space) characters. Returns the list of split parts. For example:
    • Player input: /input hello world
    • args: ["hello", "world"]