Particle DataStore failing to save enabled state

Hello,

I’m trying to set a DataStore for a ParticleEmmiters’ enabled state. I’m having trouble saving the current enabled state. Whenever I disable, leave the game, and join again the particles are still enabled. What’s going on?

Would be great if you could help!

  • Skylexion

on the line of

ParticleEffect.Enabled = Data[1]

I believe it should be Data and not Data[1], but that aside, I believe it could be that you are testing this in studio and in studio, it closes the game and doesn’t register the leave of your player.

I’m assuming there is only one particle emitter in workspace?

If not, this won’t work. You are constantly overriding data to the latest particle emitter. Also, I wouldn’t recommend using SetAsync this frequently.

If you mean to save many enable values your datastore will throttle and it causes issues. I recommend saving a table of values all at once instead of in a for loop.

I’m testing it in game, and I tried your solution but it didn’t seem to work.