I don't understand ColorSequence

Basically I got an error that said “Expected ColorSequence”. I didn’t understand it so I searched it up and I still didn’t get it. ColorSequence | Documentation - Roblox Creator Hub

If anyone can explain it better to me, it would be much appreciated.

3 Likes

ColorSequence is a one or more Color value used in instance that uses ColorSequence Datatype instead of pure Color3 Datatype.

image
this is the example of ColorSequence Usage

We have Time Value which is KeyPoint, and we also have Color which carries Color3 Datatypes

1 Like

I did get that, but I tried to do that in a script but there’s no example in that link that I’ve mentioned.

local particleT = Instance.new("ParticleEmitter")
	particleT.Color =

and I can’t go past that.

1 Like

what you can do is

local particleT = Instance.new("ParticleEmitter")
particleT.Color = ColorSequence.new() --Color3 Value inside the param

image

1 Like

I just tried that, but it just gave me a new error that said “ColorSequence.new(): table expected”.
Anything else I can try?

interesting, you might need to put this inside the ColorSequence.new()

{ColorSequenceKeyPoint.new(time, Color3Value),
--You can put more ColorSequence 
}

ColorSequenceKeypoint have time ranged from 0 to 1

Now it says “could not parse arg #2 to ColorSequenceKeypoint.new(), Color3 expected.”

What is your current script? chars

local particleT = Instance.new("ParticleEmitter")
	particleT.Color = ColorSequence.new{
	ColorSequenceKeypoint.new(0, 0,0,255)
}

No, it goes like this

ColorSequenceKeypoint.new(0,Color3.fromRGB(0,0,255))

5 Likes

For anyone still confused write it like this :

Particles.Color = ColorSequence.new{
ColorSequenceKeypoint.new(0, Color3.fromRGB(79, 126, 255)),
ColorSequenceKeypoint.new(0.5, Color3.fromRGB(0, 190, 200)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(70, 113, 255))
}

8 Likes