Particle emitter issue

Im working on when u click on a part, it does particles. (like most simulators, pet sim etc)
The way i found out how to do it is making particle emitter enabled when u click on rate 100 for 0.1 second and then disabling it.

It does not turn on or off

local cooldown = false


script.Parent.MouseClick:Connect(function()
	local CurrentHp = script.Parent.Parent:GetAttribute("Hp")
	
	if cooldown == false then
		-- removing and show hp
		cooldown = true
		local NewHp = CurrentHp - 1
		script.Parent.Parent:SetAttribute("Hp", NewHp)
		
		script.Parent.Parent.BillboardGui.TextLabel.Text = NewHp .. "/10"
		
		if NewHp == 0 then
			script.Parent.Parent:Destroy()
		end

		
		--particle
		local wavespart = script.Parent.Parent.Waves
		local waveparticles = {
			wavespart.Wave1,
			wavespart.Wave2,
			wavespart.Wave3	
		}
		for i,v in waveparticles do
			v.Enabled = true
			wait(.1)
			v.Enabled = false
			print(v)
		end
		--cooldown = false
		wait(0.4)
		cooldown = false
	end
end)

script.Parent.MouseHoverEnter:Connect(function()
	script.Parent.Parent.Highlight.Enabled = true

end)

script.Parent.MouseHoverLeave:Connect(function()
	script.Parent.Parent.Highlight.Enabled = false
end)


That is the entire script. I used a table to do it quickly and when doing
print(v) it does link to the correct one.

Are u doing this on the client or server because if its on the client I think the particles dont go off.

Also if its on the client i will recommend to handle it on the server.

The part is inside workspace, its a script so nothing client sided

You can just do ParticleEmitter:Emit(ParticleAmount)

In your case: v:Emit(Amount) replace “Amount” with the amount of particles you want to show

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.