How do I use it? If you want, you can provide an example.
A NumberRange
is a simple data type in rbxlua consisting of two Number
s. As such, the constructors for NumberRange
are relatively simple.
local range = NumberRange.new(3 , 10) print(range.Min) print(range.Max)
Another constructor exists that only takes one Number
as an argument and sets the Min
and Max
values to the said number.
local range = NumberRange.new(3) --range.Min == range.Max
NumberRange
s in tandem with NumberSequence
s are used mainly in a variety of visual effects for example defining the speed of a particle emitted from a ParticleEmitter
through its lifetime.