I've been trying to write a code which turns on/off the particle emitter depending on its parents transparency.
I want it so that if the parents transparency ==1 then the particle emitter is disabled, and the opposite if the parents transparency is ==0.
I am not too experienced in scripting lua and I just cannot figure this out. I also tried putting it in a while true do but that also doesn't work. Can anyone propose a fix/ something different?
Thank you for reading :)
This is what I have come up with:
local part = script.Parent local particles = part.ParticleEmitter if part.Transparency ==1 then particles.Enabled = false elseif part.Transparency==0 then particles.Enabled = true end
heres a script lol
its a normal script btw
hope this helps
--if you want to change the min trancparency before the particles turn off then change the -- "if part.Transparency X= 0.5 then" line part = script.Parent particle = part.ParticleEmitter while true do if part.Transparency >= 0.5 then particle.Enabled = false end if part.Transparency <= 0.5 then particle.Enabled = true end wait(0.1) end