Moving smoke that u can turn off and on

Does anybody know how to make moving smoke that u can turn on and off and also strobe for a concert same with fire?

1 Like

well so, It’s kind of easy. you can use Smoke.Enabled to turn your smoke off and on.

image
like turning your smoke on and off every 3 seconds, script should be:

-- add this script into smoke.

while true do
     script.Parent.Enabled = true
     wait(3)
     script.Parent.Enabled = false
     wait(3)
end

and It’s same to fire for you. I hope this helped :smiley:

2 Likes

It realy helped thanks. But can you make a button that starts it and stops it. like this https://www.youtube.com/watch?v=ksDxwEmfh9E but i didnt seem to be able to get this done right

1 Like

k.rbxm (6.9 KB) use this GUI.
You must check script “ObjectToggler” and set your smoke/fire/particle object at line one local Object = nil (change nil)

1 Like

This is how you enable/disable it with a button (SECURELY, so exploiters can’t alter it), the concert strobe will be a bit more difficult if you want it to match the sound playing.

–LocalScript (placed into your ScreenGui)

local player = game.Players.LocalPlayer
local button = script.Parent:WaitForChild("TextButton")
local event = game.ReplicatedStorage:WaitForChild("RemoteEvent")
local enabled = true
local delayTime = 0.5

button.MouseButton1Click:Connect(function()
    if(enabled==false) then return end
    event:FireServer()
    enabled=false
    wait(delatTime)
    enabled=true
end)

–ServerScript (Within ServerScriptService)

local event = game.ReplicatedStorage:WaitForChild("RemoteEvent")
local enabledList = {}
local delayTime = 0.5

event.OnServerEvent:Connect(function(player)
    if(not enabled[player.Name] or enabled[player.Name] == true) then
         local smoke = game.ServerStorage:WaitForChild("Smoke"):Clone()
         smoke.Parent = ANYWHERE_YOU_WANT_IT_TO_BE
         smoke.Enabled=true
    else
         print("Cant do this event yet")
         return
    end
    enabled[player.Name]=false
    wait(delayTime)
    enabled[player.Name]=true
end)

Why are you asking for us to script for you when you write the post it says in bold, “Please do not ask developers to write entire scripts/ systems for you.”???

2 Likes

If you want something to do with a button, use debounce.

Example of usage:

local clickDetector = script.Parent
local debounce = true

clickDetector.MouseClick:Connect(function()
    if debounce then
        debounce = false
        lightsOn()
    else
        debounce = true
        lightsOff()
    end
end)
1 Like