Is it possible to use '>=' on NumberSequences?

Hello.

This seems impossible to me, but I want to see if it is possible to compare NumberSequences to each other.

For example, let’s say I wanted to see if the second number on the NumberSequence is greater than or equal to 5;

local ps = -- ParticleEmitter
local sequence = NumberSequence.new(0,3)

if ps.Size >= sequence then
    print("Yes!")
else
    return
end

All I want to know is if something like this is possible. I haven’t tested anything like this yet.

Thank you.

It isn’t possible to compare NumberSequences. You could try comparing values in their KeyPoints though using .KeyPoints[n].

Well this kinda sucks. But I can understand why its probably not possible to compare a NumberSequence’s number, since it is probably super complex or something.

An example of what I said would be:

local ps = NumberSequence.new(5)
local sequence = NumberSequence.new(0,3)

if ps.Keypoints[#ps.Keypoints].Value >= sequence.Keypoints[#sequence.Keypoints].Value then
	print("Yes!")
end

You could try doing some math on the keypoints to find a value but otherwise, you can’t directly compare them.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.