Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make loop stop while processing?

Asked by
fr2013 88
5 years ago
Edited 5 years ago

So I'm currently making a Fireball and I added a decal that spins while playing the animation, but the Fireball won't come out and just adds a rotating decal. It's kinda hard to explain but how do I make a while true do work while it plays the animation without stopping the Fireball process?

Here's a part of the script:

animation:Play() ----- Active animation
    while true do
        FireCircle.CFrame = FireCircle.CFrame * CFrame.fromEulerAnglesXYZ (0,-.1,0)
        wait (0.00001)
    end --This one
    wait(0.5)
    FireCircle:Destroy()
    FireCircleA:Destroy()
    FireCircleB:Destroy()
    local Fireball = Instance.new("Part")
    local Fire = Instance.new("ParticleEmitter",Fireball)
0
Well I don't know your entire script so I can't do it myself, but, you can just change the while true do to while animation.Playing do or something, This is untested and may not 100% work. mudathir2007 157 — 5y
0
I accidentally held 'Post' and it posted three of them at once. I deleted the duplicates. Sorry XD mudathir2007 157 — 5y

Answer this question