How to check when ParticleEmitter stops so I can run extra code after it?
1 Like
When you disable the particle emitter, there is a Lifetime.Max
property. Meaning that’s the max amount of time a particle can be visible, so you can use it like this:
task.delay(
particleEmitter.Lifetime.Max,
function()
particleEmitterPart:Destroy()
end
)
3 Likes
I reccomend doing DataSigh’s solution if you are using :emit() on a particle emitter
if you arent using emit() particle emmiters dont automaticly shut off so maybe do something like this
local checkemit = nil
checkemit = particleemitter:GetPropertyChangedSignal("Enabled"):Connect(function()
if particleemitter.Enabled == false then
--extra code here
--
checkemit:Disconnect() --exclude this if you want it to keep firing extra code whenever it is turned off
end
end)
3 Likes
Yeah I am using :Emit().
Thanks for the extra method though.
3 Likes
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.