Hi! I want to make a particle emitter’s color be the same as a part’s color. The part is going to be tweening between a variety of colors. I have been trying to figure this out but I have been very stuck. I’ve tried many scripts such as this:
Part.Color = particleEmitter.Color
any help is appreciated!! <33
EDIT: My friend helped me and I figured it out! Thank you all for the help anyways!! <33333
I’m not exactly sure what you mean. If you want to change the ParticleEmitter’s color to the same color of the part whenever it changes use :GetPropertyChangedSignal().
local Part = workspace.Part
local ParticleEmitter = Part.ParticleEmitter
Part:GetPropertyChangedSignal("Color"):Connect(function()
ParticleEmitter.Color = Part.Color
end)
Lemme explain what I am trying to achieve. I have a part. This part is tweened to change colors. There is a particle emitter inside of the part that I want to be the same color as the part.
I’m sure you can convert the color to a color sequence like this
local function detectColorChange(part, theEmitter)
local color = part.Color
local sequence = ColorSequence.new(color)
theEmitter.Color = sequence
end
game.Workspace.Part.GetPropertyChangedSignal("Color"):Connect(detectColorChange(game.Workspace.Part, ParticleEmitter))