task.spawn(function()
--something happens
wait(0.1)
--something happens
wait(0.1)
--something happens
wait(0.1)
--something happens
wait(0.1)
--something happens
wait(0.1)
--something happens
wait(0.1)
--something happens
wait(0.1)
--something happens
wait(0.1)
--something happens
wait(0.1)
--something happens
wait(0.1)
end)
wait(1) -- this is the task wait time
--but, when the task is progressed I want to see if a button is clicked, then I can change the
--variable.
You can use the coroutine library, and I cannot understand why you use a lot of wait. Even easier, instead of using the coroutine library, print when the MouseButton1Click event is done.