For example Doing: Game.Workspace.Brick.Script.Disabled = true, will just make it start over. I want to know how to pause the script.
little example on how you can stop and start a script without disabling it.
--// this creates a bool Value in the workspace so you can see it working, Just look for a Go Bool Value in your workspace! local DoGo = (function() local D = workspace:FindFirstChild("Go") if(D == nil) then D = Instance.new("BoolValue",workspace) D.Name = "Go" end return D end)() -- Simple timers to show how long we're either running for or waiting for... These are not needed to do this. Its just a fancy way to show it working!. -- Grab our starting tick via tick() local StartTime = tick() local WaitTime = tick() -- main Loop while true do if(DoGo.Value == true) then -- if our Go value is true then start everything local NowTime = math.floor(tick() - StartTime + 0.5) print("Woo!, We're been computing since [",NowTime,"] Secs!") WaitTime = tick() else -- our go value is false lets wait!... local MyWaitTime = math.floor(tick() - WaitTime +0.5) StartTime = tick() print("Waiting ", MyWaitTime , "Secs!") end wait() end
hope this helps! :)
Just do event:Wait() and the event is anything you want like a bindable event or something