So I have this function
remotePro.OnServerEvent:Connect(function(plr,yes)
local char = plr.Character
local hum = char:WaitForChild("Humanoid")
local hrp = char:WaitForChild("HumanoidRootPart")
if yes == false then
hum.Animator:LoadAnimation(domainAnim):Play()
gojoSound:Play()
task.spawn((function()
task.wait(1.25)
deepHit:Play()
end))
else
local newShockWave = shockWave:Clone()
local newParts = shockWaveParticles:Clone()
local particles = newParts:WaitForChild("ParticleEmitter")
newShockWave.Parent = workspace
newParts.Parent = workspace
newShockWave.CFrame = hrp.CFrame
newParts.CFrame = hrp.CFrame
ts:Create(newShockWave,TweenInfo.new(.35),{Size = Vector3.new(150,150,150),Transparency = 1}):Play()
task.wait(.01)
particles:Emit(100)
debrisService:AddItem(newParts,10)
debrisService:AddItem(newShockWave,10)
end
end)
And right about where I have to emit the particles I add a task.wait(.01) before the particles emit because for some reason if I don’t have a wait it doesn’t emit anything.