2 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

NumberRange

The NumberRange represents a range of numbers.

NumberRange stores its NumberRange.Min and NumberRange.Max values as 32-bit floating-point numbers. Very large numbers or numbers requiring high decimal precision may lose accuracy.

Constructors

NameType / ReturnsDescription
NumberRange.newReturns a new NumberRange with the minimum and maximum set to the value.
NumberRange.newReturns a new NumberRange with the provided minimum and maximum.

NumberRange.new

Returns a new NumberRange with the minimum and maximum set to the value.

Parameters

NameTypeDefaultDescription
valuenumberThe number that both the minimum and maximum of the range are set to.

NumberRange.new

Returns a new NumberRange with the provided minimum and maximum. The minimum must be less than or equal to maximum.

Parameters

NameTypeDefaultDescription
minimumnumberThe lower bound of the range.
maximumnumberThe upper bound of the range.

Properties

NameType / ReturnsDescription
NumberRange.MinnumberThe minimum value of the NumberRange.
NumberRange.MaxnumberThe maximum value of the NumberRange.

NumberRange.Min

The minimum value of the NumberRange, always less than or equal to the maximum.

FieldValue
typenumber

NumberRange.Max

The maximum value of the NumberRange, always greater than or equal to the minimum.

FieldValue
typenumber