Skip to content

Once

Signals

Subscribe for a single emission, then disconnect. ~>Once is janitor-managed.

name::Once(fn);
name~>Once(fn);
NameTypeDescription
fnfuncListener.

A connection.

name:Once(fn)

Use for “first player only”, one-shot setup, or handshake events.

players.PlayerAdded~>Once(func (Player player) {
post("First player only");
});

Emits:

janitor:Add(players.PlayerAdded:Once(function(player: Player)
print("First player only")
end), "Disconnect")

Connect · operator-janitor · Fire