Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Particle effect color?

Asked by 9 years ago

Okay so I have my Particle effect in a tool script right now and it comes out fine. But I can't seem to figure out how to change the color of it? This is what it looks like right now:

pe = Instance.new("ParticleEmitter", brick)

color1 = Color3.new(106)

pe.Color = ColorSequence.new(color1) pe.Texture = "http://www.roblox.com/asset/?id=242911609" pe.LightEmission = .5 pe.Size = NumberSequence.new(4.5) pe.Rate = 50 pe.Speed = NumberRange.new(5)

pe.Lifetime = NumberRange.new(1)

But with the color I just can't seem to change it at all. It defaults to a Bright Red Color?

1 answer

Log in to vote
0
Answered by 9 years ago

The problem is that you are only specifying one value when creating color1. Color3.new takes 3 arguments: Red, Green and Blue. To fix it, change that line to:

color1 = Color3.new(0, 0, 0)

Replacing 0, 0, 0 with the colour you want to use, in the range of 0 to 1

But wait!

Most people prefer 0 to 255. In that case you can do:

color1 = Color3.new(0 / 255, 0 / 255, 0 / 255)

Again replacing the 0s with the colour you want, but in the range of 0 to 255

0
I believe you need enumeration for changing particle colors NotSoNorm 777 — 9y
0
I don't think you do. Exactly what do you mean by that? IDidMakeThat 1135 — 9y
Ad

Answer this question