Noverwyn Documentation
API set:
148

‹ All natives

Namespace: ZONE API set: server Language: Luau Improve

zone:whileInside

zone:whileInside(seconds: number, fn: (zone, player) -> ())

Calls a function regularly for each member.

Parameters#

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

Example#

fountain:whileInside(1, function(_, player)
	player:set("rested", (player:get("rested") or 0) + 1)
end)

Notes#

  • One function per zone and per script: a second call replaces the first.

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