Skip to content

&& || !

Operator

Boolean logic. Emits Luau and / or / not.

a && b || !c

None.

bool (Luau truthiness).

and or not

There is no ternary ? :. Use if / else. Short-circuit matches Luau.

if (player != null && player.Parent) {
post(player.Name);
}

Emits:

if player ~= nil and player.Parent then
print(player.Name)
end

operator-comparison · if · guard