Can you tween a single-color ColorSequence?

I need to tween a ColorSequence inside a ParticleEmitter, thing is, the particles need only 1 single color so I was wondering if there was a way to tween the 1 keyframe inside ColorSequence or if there was a way to convert Color3 to a ColorSequence. I’ve already read

but they are talking about a multiple-keyframed ColorSequence, I only need 1 color.

It’s actually pretty simple to convert a color3 to a color sequence:

local testColor3 = Color3.fromRGB(127, 255, 0)
local testColorSequence =
1 Like
local colorSeq ={,, 1, 1))}
1 Like

That won’t work, as all ColorSequences have to have at least 2 color sequence keypoints, first keypoint has to have a time of 0 and the last keypoint has to have a time of 1.

1 Like

It has a length of 1? Thanks for trying, I guess. I wasn’t aware 2 were required but you could just add 1 with a length of 0.

1 Like

Thanks for your replies, currently Roblox isn’t working properly and I can’t test what I wanted to test, I’ll let you know if any of what you replied works as soon as Roblox is working again :slight_smile:

1 Like

I tried with:

			local smokeTween = tweenService:Create(cauldron.Smoke.ParticleEmitter,, {
				Color ={, randomColor),, randomColor)

but it says:
TweenService:Create property named ‘Color’ on object ‘ParticleEmitter’ is not a data type that can be tweened

So I guess there’s no way to tween a colorSequence?

Not able to use Studio rn because I’m on my study laptop, but I whipped up this code and maybe you could try this:

local firstColor = --A color3
local colorSequence =
local notNeeded = --a random part, will be used later but may or may not be used in game
notNeeded.Color = firstColor
local toTween = --Another color3
local TweenService = game:GetService("TweenService")
local info =[[tweenInfo]])
local tween = TweenService:Create(notNeeded, info, {Color = toTween})
local runService = game:GetService("RunService")
local function AFunction()
   local currentColor = notNeeded.Color
   colorSequence =
   --Do whatever
local connection = runService.Heartbeat:Connect(AFunction())
1 Like

Thank you! I will try to implement it into my code and let you know :slight_smile:

I had some struggles to figure out what the code did at first, but now it works PERFECTLY.
Thank you so much!

1 Like

No prob!

min characters why

1 Like