This doesn't seem to be working and I don't really understand why. I looks fine to me.
function OnClicked()
script.Parent.Parent.SmokeMachine.Enable = true
wait(0.25)
script.Parent.Parent.SmokeMachine.Color = Color3.new(math.random(), math.random(), math.random())
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Also, how would I make it so that turns off too?

2 comments
That script works, but I'm trying to run it through an on/off button. How can that change to make that work?
Just change script.Parent.Part to the path of the part that contains your smoke :).