ParticleEmitter ColorSequence doesn't work

Hello! I’m trying to write script which will change ParticleEmitter’s color every second. Since I’m not good at ColorSequence I got a problem. Here is the script I wrote:

local part = game.Workspace.Model.one
local particle = script.Parent

local colorkp = {
	ColorSequenceKeypoint.new(0,Color3.fromRGB(255, 0, 0)),
	ColorSequenceKeypoint.new(1,Color3.fromRGB(255,165,0)),
	ColorSequenceKeypoint.new(2,Color3.fromRGB(255,255,0)),
	ColorSequenceKeypoint.new(3,Color3.fromRGB(0,255,0)),
	ColorSequenceKeypoint.new(4,Color3.fromRGB(0,255,255)),
	ColorSequenceKeypoint.new(5,Color3.fromRGB(0,0,255)),
	ColorSequenceKeypoint.new(6,Color3.fromRGB(255,0,255)),
	ColorSequenceKeypoint.new(7,Color3.fromRGB(255, 0, 0)),
}

while wait() do
	particle.Color = ColorSequence.new(colorkp)
end

Output throw an error “ColorSequence must end at time=1.0”. As I got it, there is a time limit (maybe one second, I don’t know), but is there a way to make it change its color every second repeatedly?

1 Like

The first parameter of ColorSequenceKeypoint.new() is the time that the keypoint will be located at. It must be between 0-1 always, and you have it over 1 for a lot of them. Try making them a decimal, like 0.1, 0.2, 0.3, etc.

2 Likes

I mean how long will endure that time value?

0 is the start, 1 is the end.the time parameter is kind of like a percentage of the time the color transitions.

1 Like