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

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

Asked by 7 years ago

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

Log in to vote
0
Answered by
7_c 37
7 years ago

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)
0
Ok but, how do put the image of the particles I want in the gear? I sound dumb qq CatmanErik 8 — 7y
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)" 7_c 37 — 7y
Ad

Answer this question