I'm fairly new to scripting, and I've spent the last half hour trying to figure out why my code won't work. Basically, what the script does, is it sets a ParticleEmitter's state to enabled when the parent tool is activated. I cannot figure out how to get this to work. Here's the code:
BlowTorchFlame = game.StarterPack.Blowtorch.Handle.ParticleEmitter
BlowTorch = game.StarterPack.Blowtorch
BlowTorchFlame.Enabled = false
local function onActivate()
BlowTorchFlame.Enabled = true
end
BlowTorch.Activated:connect(onActivate)
Any help would be greatly appreciated.

2 comments
Where is this script located?
Inside of the tool called "Blowtorch" in the starterpack.