NumberValue
Store a single decimal number in the object tree.
NumberValue holds one floating-point number as an instance. Use it for speeds, timers, thresholds, and any numeric setting that should be visible in the tree.
Getting started
local value = Instance.new("NumberValue")
value.Name = "SpawnDelay"
value.Value = 2.5
value.Parent = game:GetService("ReplicatedStorage")Properties
| Property | Type | Access | Default | Description |
|---|---|---|---|---|
Value | number | Read/write | 1 | The stored number. |
Unlike IntValue, fractions are kept exactly as assigned.
Notes
- Inherits from
ValueBase, which adds no members. - The default is
1, not0. - Cloning copies the current value.
- There's no range clamp; constrain values yourself where it matters.
See also
IntValuefor whole numbers.DoubleConstrainedValuefor a number with bounds.StringValueandBoolValuefor other simple values.
