Class
NumberValue
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#
Valuedouble | Used to hold a double value.ReadSafe |
Value: double#
ReadSafe
Used to hold a double value.
Events 2#
| Changed | Fires whenever the NumberValue.Value is changed. |
| changed | Deprecated |
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.
| Name | Type | Default | Description |
|---|---|---|---|
value | double | The new value after the change. |
changed(value: double)#
DeprecatedDeprecated
Deprecated. This event is a deprecated variant of NumberValue.Changed which
should be used instead.
| Name | Type | Default | Description |
|---|---|---|---|
value | double |
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild