Skip to content

warn

I/O · builtin

Writes a yellow warning. Same name and meaning as Luau warn. Use for recoverable problems.

void warn(...);
NameTypeDescription
...anyWarning payload.

void.

warn(...)

Does not stop the thread. Pair with guard when the failure is expected and you return afterwards. Use report when the program cannot continue.

guard (player != null) else {
warn("Invalid player");
return;
}

Emits:

if not (player ~= nil) then
warn("Invalid player")
return
end

post · report · guard