Noverwyn Documentation
API set:
148

‹ All natives

Namespace: TIME API set: server Language: Luau Improve

every

every(seconds: number, fn: () -> ()): Timer

Calls a function at regular intervals.

Parameters#

  • seconds (number): interval, at least 0.05
  • fn (() -> ()): function called

Returns#

Timer: to give to cancel

Example#

local bell = every(600, function()
	for _, player in players.all() do
		player:emit("bell")
	end
end)

Notes#

  • The first call happens after one interval, not right away.
  • If the server falls behind, missed calls are not caught up.

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