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)
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!