ColorSequence Value cannot be assigned to

I’m trying to make a script that has a chance to invert a part and its children’s colors.
However, I need to do it with particleemitters too…
Snippet of script…

for i,Colour in pairs(attPart.Color.Keypoints) do
   local cr = Colour.Value.r
   local cg = Colour.Value.g
   local cb = Colour.Value.b
   Colour.Value =,255-cg,255-cb)

I think you need to construct a new ColorSequence.

The third one in the list lets you input a keypoints table.