Skip to main content
Base type for values that can be stored in inputs. Provides functions for checking the underlying value type.

Static Functions

number

Creates a DataValueNumber that stores a number.

string

Creates a DataValueString that stores a string.

boolean

Creates a DataValueBoolean that stores a boolean.

color

Creates a DataValueColor that stores a Color.

Methods

isNumber

Returns true if the value is a number.
local dv: DataValueNumber = DataValue.number()
print(dv.isNumber) -- true

isString

Returns true if the value is a string.
local dv: DataValueNumber = DataValue.number()
print(dv.isString) -- false

isBoolean

Returns true if the value is a boolean.
local dv: DataValueNumber = DataValue.number()
print(dv.isBoolean) -- false

isColor

Returns true if the value is a color.
local dv: DataValueNumber = DataValue.number()
print(dv.isColor) -- false