Hello everyone!
I tried making the particle emmiter dissapear after those 5 seconds, but they wont!
How can i make so the particles dissapear? And what am i doing wrong? because their lifetime is set to 1 and their Rate is set to 0…
here is a snippet of the code i was working (The relevant part of this issue)
Tool["Meshes/boxeglove_model (1)"].AuraParticles.Rate = 1
Tool["Meshes/boxeglove_model (1)"].AuraParticles.Lifetime = 1
wait(5)
Tool["Meshes/boxeglove_model (1)"].AuraParticles.Rate = 0
Any idea on how i can fix this isue?
1 Like
Set the particle emmiters’ Enabled
property to false.
a quick tip, use task.wait()
instead of wait()
, its just better.
it still continues on… Is it anything to do with the ParticleEmmiter’s config?
the code rn:
Tool["Meshes/boxeglove_model (1)"].AuraParticles.Enabled = true
Tool["Meshes/boxeglove_model (1)"].AuraParticles.Rate = 1
Tool["Meshes/boxeglove_model (1)"].AuraParticles.Lifetime = 1
task.wait(5)
Tool["Meshes/boxeglove_model (1)"].AuraParticles.Rate = 0
Tool["Meshes/boxeglove_model (1)"].AuraParticles.Lifetime = 0
Tool["Meshes/boxeglove_model (1)"].AuraParticles.Enabled = false
How about this:
local particles = Tool["Meshes/boxeglove_model (1)"].AuraParticles
particles.Enabled = true
particles.Rate = 1
particles.Lifetime = 1
task.wait(5)
particles.Rate = 0
particles.Lifetime = 0
particles.Enabled = false
particles.Parent = game:GetService("ServerStorage")
Or, if you don’t need to ever enable it again, you could use
particles:Destroy()
Tried it, did not work but thanks for the help.
Ok. Are you getting any errors?
Apparently there was an error the problem was that I didn’t use NumberRange
this code worked:
Tool["Meshes/boxeglove_model (1)"].AuraParticles.Enabled = true
Tool["Meshes/boxeglove_model (1)"].AuraParticles.Rate = 1
Tool["Meshes/boxeglove_model (1)"].AuraParticles.Lifetime = NumberRange.new(5)
task.wait(5)
script.Parent.CanDamage.Value = true
Tool["Meshes/boxeglove_model (1)"].AuraParticles.Rate = 0
Tool["Meshes/boxeglove_model (1)"].AuraParticles.Lifetime = NumberRange.new(0)
Tool["Meshes/boxeglove_model (1)"].AuraParticles.Enabled = false
Thanks for anyone who tried to help!
1 Like
Okay! Glad you have a resolution!
1 Like
system
(system)
Closed
January 11, 2025, 4:35pm
#10
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.