Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make my gear emit particles temporarily when clicked?

Ok so I have a gear I made myself and you are able to hold it but I want to make it so that when the user clicks their mouse particles are emmited from the gear for a couple seconds then disappear. Any ideas on what to do? C:

1 answer

✓ Accepted answer

So you want a gear to emit particles when activated? I think it would be like this. And put this inside the tool, not the handle.

local deb = false
local time = 3

script.Parent.Activated:connect(function()
	if not deb then
	deb = true
	
	local particles = Instance.new("ParticleEmitter")
	particles.Parent = script.Parent.Handle
	
	wait(time)
	
	particles:remove()
	
	deb = false
	end
end)

2 comments

0

Ok but, how do put the image of the particles I want in the gear? I sound dumb qq

0

Simple. Create a new variable called "local texture = "http://roblox.com/asset/?id=YOUR ID HERE" and then, next to particles, create a line of code called "particles.Texture = (texture)"

This discussion is preserved as it was. New answers, comments, and votes are closed.