Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you change the Lifetime of a ParticleEmitter?

lft = 0.5 --Change Lifetime here
Aura = Instance.new("ParticleEmitter", LeChar.Torso)
  Aura.Lifetime = "lft"
Aura1 = Instance.new("ParticleEmitter", LeChar.Head)
  Aura1.Lifetime = "lft"
Aura2 = Instance.new("ParticleEmitter", LeChar["Right Leg"])
  Aura2.Lifetime = "lft"
Aura3 = Instance.new("ParticleEmitter", LeChar["Left Leg"])
  Aura3.Lifetime = "lft"
Aura4 = Instance.new("ParticleEmitter", LeChar["Right Arm"])
  Aura4.Lifetime = "lft"
Aura5 = Instance.new("ParticleEmitter", LeChar["Left Arm"])
  Aura5.Lifetime = "lft"

2 answers

The problem I can see is that you are doing

Aura.Lifetime = "lft";

instead of

Aura.Lifetime = lft;

If you remove the quotes from the variable it will work. The fixed code looks like this

lft = 0.5 --Change Lifetime here
Aura = Instance.new("ParticleEmitter", LeChar.Torso)
  Aura.Lifetime = lft
Aura1 = Instance.new("ParticleEmitter", LeChar.Head)
  Aura1.Lifetime = lft
Aura2 = Instance.new("ParticleEmitter", LeChar["Right Leg"])
  Aura2.Lifetime = lft
Aura3 = Instance.new("ParticleEmitter", LeChar["Left Leg"])
  Aura3.Lifetime = lft
Aura4 = Instance.new("ParticleEmitter", LeChar["Right Arm"])
  Aura4.Lifetime = lft
Aura5 = Instance.new("ParticleEmitter", LeChar["Left Arm"])
  Aura5.Lifetime = lft

1 comment

0

i tried it without quotes and it still didnt work tho :(

2 Errors:

  1. lft is a variable , anyhing in quotes( " " or ' ' ) is a string.
  2. lft must be a number range

So,

lft = NumberRange.new(0.5) -- Yes this thing does exist

Aura.LifeTime = lft -- no quotes

1 comment

0

oh okay thanks :D

This discussion is preserved as it was. New answers, comments, and votes are closed.