- Move rocket till hit
- Explode rocket and emit particles
I originally thought that the emitters sometimes delay because I’m hitting some kind of particle cap, but there’s barely any particles being used here. I made emitting the particles in its own script within the explosion part that is created where the rocket hits. In the video you can see the shot at 30 seconds that there is a particle emitted at the impact of the explosion, but then the rest of the emitters come a bit later. Anyone know what’s causing this delay?
local main = script.Parent
local explosion = main.Attachment.Explosion
local leftOverFire = main.LeftoverFire
local particles = main.Attachment.Particles
local smokecircle = main.Attachment.SmokeCircle
local smoke = main.Smoke
local sound
wait(.1)
if main:FindFirstChild("Sound") then
sound = main.Sound
else
sound = main.Rock
end
sound:Play()
explosion.Size = NumberSequence.new({
NumberSequenceKeypoint.new(0, 0); -- At t=0, size of 0
NumberSequenceKeypoint.new(.5, 10);
NumberSequenceKeypoint.new(1, 10); -- At t=1, size of 10
})
explosion:Emit(2)
leftOverFire.Size = NumberSequence.new({
NumberSequenceKeypoint.new(0, 5); -- At t=0, size of 0
NumberSequenceKeypoint.new(.1, 20);
NumberSequenceKeypoint.new(1, 20); -- At t=1, size of 10
})
leftOverFire:Emit(2)
particles.Size = NumberSequence.new({
NumberSequenceKeypoint.new(0, 0); -- At t=0, size of 0
NumberSequenceKeypoint.new(.5, 40);
NumberSequenceKeypoint.new(1, 40); -- At t=1, size of 10
})
particles:Emit(1)
smoke.Size = NumberSequence.new({
NumberSequenceKeypoint.new(0, 3); -- At t=0, size of 0
NumberSequenceKeypoint.new(.03, 20);
NumberSequenceKeypoint.new(1, 30); -- At t=1, size of 10
})
smoke:Emit(5)
smokecircle:Emit(1)
local Debris = game:GetService("Debris")
Debris:AddItem(main, 70)