bit.bor Synchronous

Combine the set bits from all input values. Use it to turn on several independent flags in one numeric value.

Syntax
Luau
bit.bor(...values: any) -> number

Parameters

Function parameters
ParameterTypeDescription
...valuesanyInput values in order. Valid numeric inputs are processed; other values are skipped.

Returns

number

An unsigned 32-bit result represented as a Luau number. With no arguments, the result is 0.

Differences from Volt

Volt documents its Bit Library setting as disabled by default. Kawaii enables bit by default. Disabling the setting removes the bit global and makes retained function references reject calls.

Availability

Bit is enabled by default. The bit global is removed when disabled, and its operations check the setting.

Example

Example
Luau
local showLabel, showBorder = 0x01, 0x04
local flags = bit.bor(showLabel, showBorder)
print(flags) -- 5
Kawaii documentation