I am experiencing a weird issue in my game. In short, whenever I clone a ParticleEmitter into the workspace (or a descendant of the workspace), it is automatically enabled. This occurs even when the particle that is being cloned is disabled, AND when a line of code is added after cloning to disable the particle.
My code is as follows:
---> services
local Players = game:GetService("Players")
---> main
local newParticle = script.Particle:Clone()
newParticle.Name = "Shine"
newParticle.Enabled = false -- even with this line the emitter still appears enabled
newParticle.Parent = Players.LocalPlayer.Character.HumanoidRootPart
Though the example above is on the client, this also occurs in my game when I run the same code to clone a particle into a descendant of the workspace on the server.
I also tried putting the line to disable the emitter after parenting and it still had no results. I also tried disabling the particle in an animation with a MarkerReachedSignal and it still did not disable the particle. This was about 5 seconds after the emitter was cloned and still no change. I’m not sure if this is a bug with my game but I searched my entire codebase for ParticleEmitter and there is no code that is automatically enabling an emitter if it is added to the workspace.
I added a loop that just disables the particle and prints its enabled property to try to debug, but it wasn’t helpful:
while true do
print(newParticle.Enabled)
newParticle.Enabled = false
task.wait()
end
The print statement printed false every time despite the particle being visibly enabled, and the Enabled property showing as true in the Properties window on both the client and the server view.
I have no idea what could be causing this bug. Any help is appreciated.