Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why isn't this particle emitter color changer isn't working?

I'm trying to make a very basic Particle emitter color changing script which takes a particle emitter's color out of a block and makes it the color of the particle emitter that's touching the block. I'm trying to take the ColorSequence from the particle emitter inside of the block but I'm not sure why it doesnt copy the color over. Am I missing code on line 4?


local Reference = script.Parent.ParticleEmitter

function onTouched(part) 
    if(part.Name ~="Aura") then return end
    part.AuraParticle.ColorSequence = Reference.ColorSequence
end 

script.Parent.Touched:connect(onTouched)

1 answer

✓ Accepted answer

There's two potential issues I've spotted in your code.

    if(part.Name ~="Aura") then return end
    part.AuraParticle.ColorSequence = Reference.ColorSequence
end 

I'm assuming AuraParticle is a ParticleEmitter. ParticleEmitters don't have a ColorSequence property. Try using the Color property.

The other potential issue is that the particle emitter's parent BaseParts may not be named "Aura", which would return before the color is ever changed in the onTouched function. It's more likely that the former is the problem, though.

Let me know if you want me to clarify anything. Hope this helps!

1 comment

0

It worked! Thank you.

This discussion is preserved as it was. New answers, comments, and votes are closed.