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

How can I fix this firework script and how can I make the particles work?

Asked by 6 years ago

How can I make these fireworks work? This is my script:

wait(5) script.Parent.Anchored=false wait(1) script.Parent.Anchored = true script.Parent.Transparency = 1 script.ParticleEmitter.Enabled = true wait(.5) script.Parent.ParticleEmitter.Enabled = false wait(2) script.Parent:Destroy()

Basically it gets unanchored, shoots up, gets anchored, and becomes transparent. Then particles are activated making it look sort of like a firework. I got this from a tutorial and all the other inputs are correct. What do I need to do? Instead of shooting out the particles it just goes up and disappears without particles coming out.

1
use the code button... User#17125 0 — 6y
0
are you serious right now? TheBeaver101 28 — 6y
0
Format your code in Lua Code block. Much more pleasant to read through, then. Goulstem 8144 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Particle are emitted on their Parent, if script is the Parent , then particles are emitted on script but you can't see script anywhere in the map only at 0,0,0 .. ^^

script.ParticleEmitter.Parent = script.Parent
PARTE = script.Parent.ParticleEmitter
wait(5) 
script.Parent.Anchored=false 
wait(1) 
script.Parent.Anchored = true 
script.Parent.Transparency = 1 
PARTE.Enabled = true 
wait(.5) 
PARTE.Enabled = false 
wait(2) 
script.Parent:Destroy()

0
It did not work :/ TheBeaver101 28 — 6y
0
Ignore first line but make sure that ParticleEmitter is placed inside the Part not inside the script User#17685 0 — 6y
0
The actual firework is a union, just thought I'd mention. TheBeaver101 28 — 6y
0
Thank you so much! It finally worked! :) Wish I had 25 rep to upvote. TheBeaver101 28 — 6y
Ad

Answer this question