Noverwyn Documentation
API set:
148

‹ All natives

Namespace: SCRIPT API set: server Language: Luau Improve

on

on(name: string, fn: (...) -> ())

Listens to an event.

Several functions can listen to the same event; they are called in order. An error in one does not prevent the others.

Parameters#

  • name (string): event name
  • fn ((...) -> ()): function called

Example#

on("playerJoin", function(player)
	log(player.name, "joined")
end)

See also#

Namespace: PLAYER

Namespace: ENTITY

Namespace: ZONE

Namespace: TIME

Namespace: SCRIPT

Namespace: EVENT

Namespace: CLIENT

Namespace: CLIENT EVENT

Namespace: UNIFORM

Namespace: WAND

Namespace: LOOK

Namespace: CONTROL

Namespace: GAIT

Namespace: VOICE

Namespace: ATELIER

Namespace: TOOL