##Problem
The ParticleEmitter's Color property is not a Color3 value. It's a ColorSequence.
##Solution
You would have to manipulate the ColorSequence to your favor.
- You can have one argument being the only color that will be emitted.
game.Workspace.Part.ParticleEmitter.Color = ColorSequence.new(Color3.new(1,0,0))
- You can have two arguments for transitioning from one color to the other.
game.Workspace.Part.ParticleEmitter.Color = ColorSequence.new(Color3.new(1,0,0), Color3.new(0,0,1))
- Or you can have an array of multiple ColorSequenceKeypoints to allow adjustment of colors and timing.
game.Workspace.Part.ParticleEmitter.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.new(1,0,0)),
ColorSequenceKeypoint.new(.5, Color3.new(0,1,0)),
ColorSequenceKeypoint.new(1, Color3.new(0,0,1))
})
What ColorSequenceKeypoint.new() will do is take the time between 0 and 1 of which the particle will change. It will then take the Color3 value as the second argument and transition the first color by that time.
##Note
Color3.new() will only take float values between 0 and 1. If you have any value higher, the Color in that category will be at 1. One way to solve this is to divide all three color values by 255. If you wish to use integers between 0 and 255 with Color3, use Color3.fromRGB().
For the sake of fixing your script, I will just transfer all the Colors to the basic sequence and I will convert Color3.new() to Color3.fromRGB().
##Final Script
local p1 = game.Workspace.particles.p1.ParticleEmitter
local p2 = game.Workspace.particles.p2.ParticleEmitter
while true do
wait(3)
p1.Color = ColorSequence.new(Color3.fromRGB(0,0,0))
p2.Color = ColorSequence.new(Color3.fromRGB(0,0,0))
wait(3)
p1.Color = ColorSequence.new(Color3.fromRGB(0,255,255))
p2.Color = ColorSequence.new(Color3.fromRGB(0,255,255))
end
######Hopefully this answered your question, if it did do not forget to hit the accept answer button. If you have any questions, feel free to comment and I will get back to you.
1 comment
Thanks! That worked.