Right - I made this long script that basically plays audio end on end, switching songs when on ends. I want to create a screenGUI that, when you click it, pauses the whole thing, and that when you click play, it continues where it left off. Is it possible to pause a script while it's running?
✓ ANSWER ACCEPTED
Can you pause scripts?
1 answer
✓ Accepted answer
-- Try this, I don't know were your Script is located or were the sound is being stored so adjust --accordingly
SoundObj = Put the sound Location here.
function Toggle()
if game.Workspace["Script Name here"].Disabled ==true then
game.Workspace["Script Name here"].Disabled = false
SoundObj:stop()
elsedo
game.Workspace["Script Name here"].Disabled = true
soundObj:Play()
end
end
--Assuming you will put this in to a button
script.Parent.MouseButton1Down:connect(Toggle)
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
There's no actual 'Sound' to link to. My script creates new Sound instances, and changes the asset id
Do you know how to script?
Coming back to this - a year later - this was actually quite useful. Thanks.
lol