Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

NumberSequence: all keypoints must be ordered by time?

I tried to fix my errors but every time I do the script just gave me the: NumberSequence: all keypoints must be ordered by time

Help?

local seat = script.Parent
local speed = seat.Velocity.magnitude
local dirt = script.Parent.Trail.ParticleEmitter.Size

if speed >= 1 then
	local dirt = NumberSequence.new{
		NumberSequenceKeypoint.new(0, 0, 0),
		NumberSequenceKeypoint.new(3, 1, 0)
	}
else
	local dirt = NumberSequence.new{
		NumberSequenceKeypoint.new(3, 0, 0),
		NumberSequenceKeypoint.new(0, 1, 0)
	}
end

2 answers

On the second dirt value, you set time to 3 for the first keypoint and then set the second keypoint's time to 0. Three is not greater than zero. Swap lines 12 and 13.

1 comment

0

It fixed some of the script, but there's another problem. (please read the answer I gave below)

It did kinda fix things, but when I print it out the script won't detect that the seat part is running.

local seat = script.Parent local speed = seat.Velocity.magnitude local dirt = script.Parent.Trail.ParticleEmitter.Size

while true do if speed >= 1 then local dirt = NumberSequence.new{ NumberSequenceKeypoint.new(0, 0, 0), NumberSequenceKeypoint.new(1, 3, 0.25) } print("Rover Running") wait() else local dirt = NumberSequence.new{ NumberSequenceKeypoint.new(0, 3, 0.25), NumberSequenceKeypoint.new(1, 0, 0) } wait() print("Rover Stopped") end end

The problem is the velocity part I guess. Any fix?

This discussion is preserved as it was. New answers, comments, and votes are closed.