Roblox UtilitiesDevlHub Roblox Documentation

Class

NumberValue

Inherits
ValueBase › Instance › Object
Memory category
Instances

A container object for a single double-precision floating point number.

Store a single Luau number, defined to be double-precision floating point number, or more commonly known as a double. This stores a number in 64 bits (8 bytes) using the IEEE 754 representation (1 sign bit, 11 exponent bits and 52 fractional bits). Maximum and minimum values are ±1.7976931348623157e+308, with a range of ±2^53 for exact integer representations.

Like all ValueBase objects, this single value is stored in the Value property. The Changed event fires with the new value being stored in the object, instead of a string representing the property being changed.

Properties 1#

ValuedoubleUsed to hold a double value.ReadSafe

Value: double#

ReadSafe

Used to hold a double value.

Events 2#

ChangedFires whenever the NumberValue.Value is changed.
changedDeprecated

Changed(value: double)#

Fires whenever the NumberValue.Value changes. It runs with the new value being stored in the argument object, instead of a string representing the property being changed.

Listening for the Changed signal can be useful in games that use NumberValues to track values like leaderboard statistics or item prices.

NameTypeDefaultDescription
valuedoubleThe new value after the change.

changed(value: double)#

DeprecatedDeprecated

Deprecated. This event is a deprecated variant of NumberValue.Changed which should be used instead.

NameTypeDefaultDescription
valuedouble

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed